medea-generators 0.2.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/generators/medea/init/USAGE +23 -0
- data/lib/generators/medea/init/init_generator.rb +5 -5
- data/lib/generators/medea/scaffold/USAGE +0 -3
- data/lib/generators/medea/scaffold/templates/views/erb/edit.html.erb +1 -1
- data/lib/generators/medea/scaffold/templates/views/erb/index.html.erb +1 -1
- data/lib/generators/medea/scaffold/templates/views/erb/new.html.erb +1 -1
- data/lib/generators/medea/scaffold/templates/views/erb/show.html.erb +1 -1
- data/lib/generators/medea/scaffold/templates/views/haml/edit.html.haml +2 -1
- data/lib/generators/medea/scaffold/templates/views/haml/index.html.haml +2 -1
- data/lib/generators/medea/scaffold/templates/views/haml/new.html.haml +2 -1
- data/lib/generators/medea/scaffold/templates/views/haml/show.html.haml +2 -1
- data/medea-generators.gemspec +1 -1
- metadata +4 -3
@@ -0,0 +1,23 @@
|
|
1
|
+
Description:
|
2
|
+
Initialises the settings required to use JasonDB from your Rails application.
|
3
|
+
Also patches config/application.rb to remove the dependency on active record.
|
4
|
+
Topics created are:
|
5
|
+
<base>-dev # Used in the rails development environment
|
6
|
+
<base>-test # Used in the rails test environment
|
7
|
+
<base> # Used in the rails production environment
|
8
|
+
|
9
|
+
Usage:
|
10
|
+
Pass the name of your desired topic (JasonDB namespace), and a username and password.
|
11
|
+
Note that all three of these fields are optional and can be randomly generated for you.
|
12
|
+
|
13
|
+
Examples:
|
14
|
+
rails generate medea:init
|
15
|
+
|
16
|
+
Will initialise database.yml, add the JasonDB initialiser, patch application.rb,
|
17
|
+
generate a topic base, username and password and create the topic(s) on JasonDB.
|
18
|
+
|
19
|
+
rails generate medea:init myapp user_name p@$$w0rD
|
20
|
+
|
21
|
+
Will do the same as above, but will use 'myapp' as the topic base, 'user_name' as the
|
22
|
+
user name and 'p@$$w0rD' as the password in database.yml and when creating the topics
|
23
|
+
on JasonDB.
|
@@ -64,9 +64,9 @@ require 'rails/test_unit/railtie'
|
|
64
64
|
end
|
65
65
|
|
66
66
|
application_rb.close
|
67
|
-
say_status "
|
67
|
+
say_status "patch", "config/application.rb", :green
|
68
68
|
else
|
69
|
-
say_status "
|
69
|
+
say_status "check", "config/application.rb", :blue
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
@@ -100,12 +100,12 @@ require 'rails/test_unit/railtie'
|
|
100
100
|
end
|
101
101
|
|
102
102
|
if success
|
103
|
-
say_status "create", "Topic
|
103
|
+
say_status "create", "JasonDB Topic: #{topic}"
|
104
104
|
else
|
105
105
|
if topic[0] =~ /[0-9]/
|
106
|
-
say_status "
|
106
|
+
say_status "error", "An error occurred while creating the Topic. It must start with a letter", :red
|
107
107
|
else
|
108
|
-
say_status "
|
108
|
+
say_status "warning", "An error occurred while creating the Topic. Does it already exist?", :yellow
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
@@ -4,9 +4,6 @@ Description:
|
|
4
4
|
resource-oriented application. Tests or specs are also generated depending
|
5
5
|
on if you have a "spec" directory or not.
|
6
6
|
|
7
|
-
IMPORTANT: This generator uses the "title" helper method which is generated
|
8
|
-
by the nifty_layout generator. You may want to run that generator first.
|
9
|
-
|
10
7
|
Usage:
|
11
8
|
Pass the name of the model, either CamelCased or under_scored, as the first
|
12
9
|
argument along with an optional list of attribute pairs and controller actions.
|
data/medea-generators.gemspec
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michael Jensen
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- Gemfile.lock
|
77
77
|
- Rakefile
|
78
78
|
- lib/generators/medea.rb
|
79
|
+
- lib/generators/medea/init/USAGE
|
79
80
|
- lib/generators/medea/init/init_generator.rb
|
80
81
|
- lib/generators/medea/init/templates/database.yml
|
81
82
|
- lib/generators/medea/init/templates/jasondb.rb
|