Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
10c4a92
Update README
tebemis Sep 14, 2019
2cf0799
Remove framework_components examples
tebemis Sep 28, 2019
590730e
Refactor CLI and commands, commit before switcihing to rspec
tebemis Sep 29, 2019
95c6c81
Switched to rspec, started wrting specs, cleaned up some old garbage …
tebemis Sep 29, 2019
75bcebf
Update version of ruby in travis file
tebemis Sep 29, 2019
3f95135
Update travis file
tebemis Sep 29, 2019
71a1ae9
Fix specs for persisted hash
tebemis Sep 29, 2019
70cd818
Move things around
tebemis Sep 29, 2019
987ad91
Refactored commands, eliminated logger, started testing commends
tebemis Sep 30, 2019
bfca4d7
Remove framework library components
tebemis Sep 30, 2019
1e920c9
Started implementing new server command
tebemis Oct 14, 2019
f9ecc98
Basic supervisor working
tebemis Oct 26, 2019
61ba5a9
newgemspec
tebemis Oct 26, 2019
61b25eb
fixup
tebemis Oct 26, 2019
5cbc595
Moved all commands that are going to be implemented on the commands s…
tebemis Oct 26, 2019
23ec4c1
Move commands around
tebemis Oct 27, 2019
edd48de
Update supervisor
tebemis Oct 27, 2019
11681a7
update gemspec and gitignore
tebemis Oct 27, 2019
993a464
started working on internal supervisor
tebemis Oct 28, 2019
9ab3425
Cleanup for the weekend
tebemis Oct 28, 2019
235f11e
Update checkup to build docker image and install mongo via docker
tebemis Nov 10, 2019
bb70749
Got mqtt broker launched with docker
tebemis Nov 10, 2019
826434d
Fix silly bug
tebemis Nov 10, 2019
3030a82
Version bump to 2.0.0.alpha1
tebemis Nov 10, 2019
0ef0a7f
regenerate gemspec
tebemis Nov 10, 2019
0979d12
Start mongo with docker
tebemis Nov 10, 2019
5f0e88e
Start framework level bots using docker
tebemis Nov 10, 2019
0169cac
Fix readme and silly bug
tebemis Nov 10, 2019
3c3621e
Basic control loop for commands
tebemis Nov 10, 2019
0bb1888
Move things around
tebemis Nov 10, 2019
4295e0a
Implemented command new
tebemis Nov 11, 2019
c8482cd
Stopping for the day
tebemis Nov 11, 2019
c9e488b
Remove test nutella app
tebemis Nov 11, 2019
2cb88df
Runlist spec and Start command spec
tebemis Nov 25, 2019
bd46b72
Revert to old nutella_lib
tebemis Nov 25, 2019
ece0d26
Cleanup start
tebemis Dec 13, 2019
495ffaa
Fixed tests
tebemis Dec 14, 2019
9f0d106
Complete start command
tebemis Dec 14, 2019
efab22a
Fix new command
tebemis Dec 14, 2019
ee2f490
Start working on spec for framework bots
tebemis Dec 14, 2019
bdddf15
Add image for js
tebemis Dec 15, 2019
823980d
Make docker image for js
tebemis Dec 15, 2019
fbfb34f
daily
tebemis Jun 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Nutella
# nutella
config.json
runlist.json
broker/
.tmp/
.pid

# Test app
test_app/
Expand All @@ -15,7 +14,8 @@ rdoc/
doc/
.yardoc
.bundle
Gemfile.lock
spec/examples.txt
.gem

# Mac crap
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--require spec_helper
--format Fuubar
--color
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
language: ruby
rvm:
- 2.4.1
- 2.3.8
before_install:
- gem update --system
- gem install bundler
notifications:
email: false
3 changes: 3 additions & 0 deletions Dockerfile.jsimage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Builds an image to run js bots
FROM node:13.3.0
WORKDIR /app
7 changes: 7 additions & 0 deletions Dockerfile.rubyimage
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Builds an image to run framework level bots
FROM ruby:2.3.8
RUN gem install bundler
RUN bundle config --global frozen 1
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN bundle install
25 changes: 14 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
source 'http://rubygems.org'

gem 'semantic', '~> 1.4'
gem 'logging', '~> 2.2'
ruby '2.3.8'

gem 'ansi', '~> 1.5'
gem 'bson', '~> 3.0'
gem 'docker-api', '~> 1.34'
gem 'git', '~> 1.2'
gem 'nutella_lib','~>0.6'
gem 'nokogiri', '~>1.6'
gem 'semantic', '~> 1.4'
gem 'sinatra', '~>1.4'
gem 'sinatra-cross_origin', '~> 0.3.2'
gem 'thin', '~>1.6'
gem 'nokogiri', '~>1.6'
gem 'slop', '~>4.0'
gem 'nutella_lib','~>0.4', '>=0.4.24'
gem 'activesupport', '~>4.2'
gem 'bson', '~> 3.0'

group :development do
gem 'shoulda', '~> 3.0'
gem 'yard', '~> 0.9.11'
gem 'rdoc', '~> 4.0'
gem 'bundler', '~> 1.0'
gem 'jeweler', '~> 2.0'
gem 'simplecov', '~> 0.9'
gem 'bundler', '~> 2.0'
gem 'jeweler', '~> 2.3'
end

group :test do
gem 'rake'
gem 'rspec', '~> 3.8'
gem 'fuubar', '~> 2.4'
gem 'awesome_print', '~> 1.8'
gem 'pry', '~> 0.12.2'
end
133 changes: 133 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
GEM
remote: http://rubygems.org/
specs:
addressable (2.4.0)
ansi (1.5.0)
awesome_print (1.8.0)
bson (3.2.7)
builder (3.2.4)
coderay (1.1.2)
daemons (1.3.1)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.3)
docker-api (1.34.2)
excon (>= 0.47.0)
multi_json
eventmachine (1.2.7)
excon (0.71.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
fuubar (2.5.0)
rspec-core (~> 3.0)
ruby-progressbar (~> 1.4)
git (1.5.0)
github_api (0.16.0)
addressable (~> 2.4.0)
descendants_tracker (~> 0.0.4)
faraday (~> 0.8, < 0.10)
hashie (>= 3.4)
mime-types (>= 1.16, < 3.0)
oauth2 (~> 1.0)
hashie (4.0.0)
highline (2.0.3)
jeweler (2.3.9)
builder
bundler
git (>= 1.2.5)
github_api (~> 0.16.0)
highline (>= 1.6.15)
nokogiri (>= 1.5.10)
psych
rake
rdoc
semver2
jwt (2.2.1)
method_source (0.9.2)
mime-types (2.99.3)
mini_portile2 (2.4.0)
mongo (2.1.2)
bson (~> 3.0)
mqtt (0.5.0)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.1.1)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
nutella_lib (0.6.0)
ansi (~> 1.5, >= 1.5)
mongo (~> 2.0)
mqtt (~> 0.5, >= 0.5)
oauth2 (1.4.2)
faraday (>= 0.8, < 2.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
psych (3.1.0)
rack (1.6.11)
rack-protection (1.5.5)
rack
rake (13.0.1)
rdoc (4.3.0)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.0)
rspec-support (~> 3.9.0)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.0)
ruby-progressbar (1.10.1)
semantic (1.6.1)
semver2 (3.4.2)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sinatra-cross_origin (0.3.2)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thread_safe (0.3.6)
tilt (2.0.10)
yard (0.9.20)

PLATFORMS
ruby

DEPENDENCIES
ansi (~> 1.5)
awesome_print (~> 1.8)
bson (~> 3.0)
bundler (~> 2.0)
docker-api (~> 1.34)
fuubar (~> 2.4)
git (~> 1.2)
jeweler (~> 2.3)
nokogiri (~> 1.6)
nutella_lib (~> 0.6)
pry (~> 0.12.2)
rake
rdoc (~> 4.0)
rspec (~> 3.8)
semantic (~> 1.4)
sinatra (~> 1.4)
sinatra-cross_origin (~> 0.3.2)
thin (~> 1.6)
yard (~> 0.9.11)

RUBY VERSION
ruby 2.3.8p459

BUNDLED WITH
2.0.2
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,57 @@

[![Gem Version](https://badge.fury.io/rb/nutella_framework.svg)](http://badge.fury.io/rb/nutella_framework)
[![Build Status](https://travis-ci.org/nutella-framework/nutella_framework.svg?branch=master)](https://travis-ci.org/nutella-framework/nutella_framework)
[![Code Climate](https://codeclimate.com/github/nutella-framework/nutella_framework/badges/gpa.svg)](https://codeclimate.com/github/nutella-framework/nutella_framework)

nutella is a framework to build and run Macroworlds. It's still _very_ under development so any help [finding and fixing bugs](https://github.com/nutella-framework/nutella_framework/issues) will be greatly appreciated!
nutella is a framework to build and run Macroworlds. The original prototype was built as part of my dissertation and the code was hastly cobbled together at times. I have tried to cleanup over the years but please don't hate me if you find some skeletons. ☠️ If you want to help clean things up, give me a shout: help is greatly appreciated!

# Installing
Nutella is written in ruby but it leverages a bunch of other technologies that need to be installed. You will need:
nutella works on OSX and Linux (tested on Ubuntu) and it depends on a couple other things to work correctly. You will need:

1. _ruby_ (version >= 2.1.0). Do yourself a favor and use [RVM](https://rvm.io/rvm/install) to install Ruby.
1. _git_ (version >= 1.8.0). Do yourself a favor and use [Homebrew](http://brew.sh/) to install git, if you are on OSX.
1. _tmux_ (version >= 1.8.0). Do yourself a favor and use [Homebrew](http://brew.sh/) to install tmux, if you are on OSX.
1. _Docker_ (version >= 17.03.0). We use Docker to run the broker that handles all communications between all the pieces of the framework. Do yourself a favor and use [Docker for mac](https://store.docker.com/editions/community/docker-ce-desktop-mac), if you are on OSX.
1. _mongoDB_ (optional). You'll need mongoDB if you want to use it with `nutella.persist`.
1. _ruby_ (version >= 2.3.8). Do yourself a favor and use [RVM](https://rvm.io/rvm/install) to install Ruby.
1. _docker_ (version >= 17.03.0). If you are on OSX, do yourself a favor and use [Docker for mac](https://store.docker.com/editions/community/docker-ce-desktop-mac).
1. _git_ (version >= 1.8.0). Should come with the OS, nothing to do, yay!

Once you have all of these, to install nutella simply do:
Once you have all the nutella dependencies installed you can do:
```
gem install nutella_framework
```
Once the installation is complete you should be able to type `nutella` in your shell and get a welcome message.
You should then be able to type `nutella` in your shell and get a welcome message that looks like this

```
_ _ _
| | | | |
_ __ _ _| |_ ___| | | __ _
| _ \| | | | __/ _ \ | |/ _ |
| | | | |_| | || __/ | | (_| |
|_| |_|\__,_|\__\___|_|_|\__,_|

Welcome to nutella version 1.0.0! For a complete lists of available commands type 'nutella help'
Looks like this is a fresh installation of nutella. Please run 'nutella checkup' to check all dependencies are installed.
```

## nutella checkup
If you are reading this you probably already saw the warning: "Looks like this is a fresh installation of nutella. Please run 'nutella checkup' to check all dependencies are installed".
If you are reading this you probably already saw the warning: "Looks like this is a fresh installation of nutella. Please run `nutella checkup` to check all dependencies are installed correctly". **Please follow the prompt!**

nutella is written in ruby but it's designed to run bots and interfaces written in virtually any programming language. All communications among these components are handled by an _MQTT broker_ which needs to be installed (together with its dependencies) before nutella can actually work correctly. Therefore **right after your install nutella** you should run:
```
nutella checkup
```
This will install the [Mosca](http://www.mosca.io/) MQTT broker and make sure all the dependencies required by nutella are installed as well.

Congratulations! nutella is ready to use!


# Where next?
If you already have an application you want to tinker with (like [RoomQuake](https://github.com/ltg-uic/roomquake)) simply checkout the application to a local folder, `cd /to/my/local/folder` and start tinkering away. Not sure how? Check out the [man page for the nutella command line tool](https://github.com/nutella-framework/nutella_framework/wiki).
If you **already have an application** you want to tinker with (like [RoomQuake](https://github.com/ltg-uic/roomquake)) simply clone the application to your local folder of choice, `cd /to/my/local/folder` and start tinkering away. Not sure how? Check out the [docs](https://github.com/nutella-framework/docs)!

If you want to **create your first application** check out [this tutorial](https://github.com/nutella-framework/docs/blob/master/getting_started/tutorial_1.md).


If you want to create your own application, hold on tight, a tutorial is coming soon.
# Contributing to nutella
Clone the repo, make sure you have [bundler](https://bundler.io/) installed, `bundle install` to take care of the dependencies, and then `rake` to run all the tests. If you want to build and install the gem just `rake install`. If you want a list of available build tasks, simply type `rake -T`.

# nutella 2.0
In the summer of 2019, as a result of the feedback from nutella users (a.k.a. Tom), it became apparent to me that I needed to re-architect nutella into two separate components
1. A CLI that provided a way to interface with nutella
2. A "server" component that processes and executes the commands sent by either the CLI or other nutella components.

# Building (for contributors)
Clone the repo, `bundle install` to take care of the dependencies and then `rake` to run all the tests. If you want to build and install the gem just `rake install`. If you want a list of available build tasks, simply type `rake -T`.
It also became clear I needed to improve the documentation of the nutella protocol and how it works in order to allow the expansion to more languages than the ones currently supported.

Work on nutella 2 can be tracked on [this project](https://github.com/orgs/nutella-framework/projects/2).
18 changes: 6 additions & 12 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,18 @@ Jeweler::Tasks.new do |gem|
gem.description = %Q{utella is a framework to create and run RoomApps}
gem.email = "[email protected]"
gem.authors = ["Alessandro Gnoli"]
gem.required_ruby_version = "~> 2.0"
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

desc "Code coverage detail"
task :simplecov do
ENV['COVERAGE'] = "true"
Rake::Task['test'].execute
end

task :default => :test
task :default => :spec

require 'yard'
YARD::Rake::YardocTask.new
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
2.0.0.alpha1

This file was deleted.

6 changes: 0 additions & 6 deletions example_framework_components/example_framework_bot/startup

This file was deleted.

This file was deleted.

Loading