mj-suspenders 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/suspenders/app_builder.rb +23 -1
- data/lib/suspenders/generators/app_generator.rb +7 -1
- data/lib/suspenders/version.rb +1 -1
- data/templates/Gemfile.erb +2 -2
- data/templates/home.html.erb +1 -0
- data/templates/home_routing_spec.rb +8 -0
- data/templates/spec_helper.rb +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 120ab3f24807cd407810446fb266afdb4af79bf6
|
4
|
+
data.tar.gz: dc5409b8186a8ecd75e6b87fa2895030851cc5e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 775fc5d7ce7c0bff7887c58e533c36f983fec6e7a3987a300dc19fedb94d8581fcfde040b9adf46ec9e761010242180aca0c69c7f114ba3272b0ac2480ff10a0
|
7
|
+
data.tar.gz: afd777ced6f7a3849036e94211491726fd028ab7e87d1de7853932a3ff9cb6e60dee88f16968a51a51d61f455a3cff900529bf44db1eb089fd7bee4e59c4fcec
|
@@ -86,6 +86,26 @@ end
|
|
86
86
|
template 'secret_token.rb',
|
87
87
|
'config/initializers/secret_token.rb',
|
88
88
|
:force => true
|
89
|
+
|
90
|
+
say "Gerating token for testing env"
|
91
|
+
generate_secret_token('test')
|
92
|
+
|
93
|
+
say "Gerating token for development env"
|
94
|
+
generate_secret_token('development')
|
95
|
+
end
|
96
|
+
|
97
|
+
def generate_secret_token(env)
|
98
|
+
token = SecureRandom.urlsafe_base64(64)
|
99
|
+
|
100
|
+
application(nil, env: env) do
|
101
|
+
"ENV['SECRET_KEY_BASE'] = '#{token}'"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
def generate_home_page
|
106
|
+
copy_file 'home.html.erb', 'app/views/pages/home.html.erb'
|
107
|
+
copy_file 'home_routing_spec.rb', 'spec/routing/home_routing_spec.rb'
|
108
|
+
route "root to: 'high_voltage/pages#show', id: 'home'"
|
89
109
|
end
|
90
110
|
|
91
111
|
def create_partials_directory
|
@@ -219,7 +239,9 @@ end
|
|
219
239
|
end
|
220
240
|
|
221
241
|
def init_git
|
222
|
-
|
242
|
+
git :init
|
243
|
+
git add: '.'
|
244
|
+
git commit: '-m "initial commit"'
|
223
245
|
end
|
224
246
|
|
225
247
|
def copy_miscellaneous_files
|
@@ -28,8 +28,9 @@ module Suspenders
|
|
28
28
|
invoke :copy_miscellaneous_files
|
29
29
|
invoke :customize_error_pages
|
30
30
|
invoke :remove_routes_comment_lines
|
31
|
-
invoke :
|
31
|
+
invoke :setup_home_page
|
32
32
|
invoke :setup_database
|
33
|
+
invoke :setup_git
|
33
34
|
end
|
34
35
|
|
35
36
|
def customize_gemfile
|
@@ -39,6 +40,11 @@ module Suspenders
|
|
39
40
|
bundle_command 'install'
|
40
41
|
end
|
41
42
|
|
43
|
+
def setup_home_page
|
44
|
+
say "Setting up home page"
|
45
|
+
build :generate_home_page
|
46
|
+
end
|
47
|
+
|
42
48
|
def setup_database
|
43
49
|
say 'Setting up database'
|
44
50
|
build :create_database
|
data/lib/suspenders/version.rb
CHANGED
data/templates/Gemfile.erb
CHANGED
@@ -10,7 +10,7 @@ gem 'mysql2'
|
|
10
10
|
gem 'rack-timeout'
|
11
11
|
gem 'rails', '>= 4.0.4'
|
12
12
|
gem 'recipient_interceptor'
|
13
|
-
gem 'sass-rails'
|
13
|
+
gem 'sass-rails', '~> 4.0.0'
|
14
14
|
gem 'simple_form'
|
15
15
|
gem 'title'
|
16
16
|
gem 'uglifier'
|
@@ -30,7 +30,7 @@ group :development, :test do
|
|
30
30
|
gem 'awesome_print'
|
31
31
|
# gem 'dotenv-rails'
|
32
32
|
gem 'pry-rails'
|
33
|
-
gem 'rspec-rails', '
|
33
|
+
gem 'rspec-rails', '~> 3.0.0.beta'
|
34
34
|
gem 'machinist', '>= 2.0.0.beta2'
|
35
35
|
end
|
36
36
|
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Yay!</h1>
|
data/templates/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mj-suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -150,6 +150,8 @@ files:
|
|
150
150
|
- templates/devise.pt-BR.yml
|
151
151
|
- templates/disable_xml_params.rb
|
152
152
|
- templates/errors.rb
|
153
|
+
- templates/home.html.erb
|
154
|
+
- templates/home_routing_spec.rb
|
153
155
|
- templates/i18n.rb
|
154
156
|
- templates/pt-BR.yml
|
155
157
|
- templates/ruby-version.erb
|