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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ce9c9bb9d95b46d11fce99c997906571695daa5
4
- data.tar.gz: 9ef899d5c91f76c8df2cb8b76eabc57a13c19d85
3
+ metadata.gz: 120ab3f24807cd407810446fb266afdb4af79bf6
4
+ data.tar.gz: dc5409b8186a8ecd75e6b87fa2895030851cc5e8
5
5
  SHA512:
6
- metadata.gz: e1531d4b2b801b48c056465ff439a2c1c4bac7c39086f65fec8b1765e03b0545c9299ded23ea45e0c940a0cbf49515539656f2de06fb164c6433d1a283174ef9
7
- data.tar.gz: c2c136797386bb6e0924fd1800e1c5d2fcb4e8b85ce4db82fd15ac450412dcadb99a1f10dccdfea602990a7c4f26081c0ae9c8ed42d9e1722c831850a7462558
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
- run 'git init'
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 :setup_git
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
@@ -1,3 +1,3 @@
1
1
  module Suspenders
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -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', '>= 2.14'
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>
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe HighVoltage::PagesController, "routes" do
4
+ it "routes to home page" do
5
+ expect(get('/')).to route_to('high_voltage/pages#show', id: 'home')
6
+ expect(get(root_path)).to route_to('high_voltage/pages#show', id: 'home')
7
+ end
8
+ end
@@ -3,6 +3,9 @@ SimpleCov.start 'rails'
3
3
 
4
4
  ENV['RAILS_ENV'] = 'test'
5
5
 
6
+ # TODO remvoe when warning is fixed
7
+ require 'minitest/autorun'
8
+
6
9
  require File.expand_path('../../config/environment', __FILE__)
7
10
 
8
11
  require 'rspec/rails'
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
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-08 00:00:00.000000000 Z
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