happy_seed 0.0.7 → 0.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06bd0e21a25b074638ecba10e48852884e1c321d
4
- data.tar.gz: 9c0399877461aa4b0d1747ff580aa1e8f25c1c87
3
+ metadata.gz: 095f6b6f268260aa5455d3c28f28f184dbaadc87
4
+ data.tar.gz: 6dd35f99936ad73d1bab319593b86e9ccaaab39e
5
5
  SHA512:
6
- metadata.gz: 00cf03d8c8a5d214ecd1b59d0cca9eb922c1807b780e5a902c23d5b63981447b09c1f67f9bd51c4b8dffa049210390602bd2b0bffc5ed21f0cdb99dd203f41bb
7
- data.tar.gz: b469fbd90c137ae52d094ce1ef84608608d995fed9ee877ea14705065dccb6750d6fd716a8736ef013a980ad3bf891782d5a3c781243a4c54b19151717ec67fd
6
+ metadata.gz: fa150bfe9aebda139fa65df24aab80b4daad5ade0bddb5a42a8d43606474210e92c00b4dccb19b939c581442859a9be2fba7acc6044be6960c94ee87ff9e3e8a
7
+ data.tar.gz: 5910192e7cec40441a2e8b779dc369a86015503331d1b14e35ef23c5714d7718c60eda11172c244611deace619829054e11d8a7f9824312c69399607ad1aa533
data/bin/happy_seed CHANGED
@@ -4,4 +4,4 @@ spec = Gem::Specification.find_by_name("happy_seed")
4
4
  gem_root = spec.gem_dir
5
5
 
6
6
  file = File.join( ENV['SEED_DEVELOPMENT'] || gem_root, "happy_seed.rb" )
7
- system( "rails new -m #{file} #{ARGV.join( " " )}" )
7
+ system( "rails new -m #{file} #{ARGV.join( " " )}" )
data/happy_seed.rb CHANGED
@@ -8,6 +8,7 @@ gem_group :development, :test do
8
8
  gem "rspec-autotest"
9
9
  gem "factory_girl_rails"
10
10
  gem "autotest-rails"
11
+ gem "capybara"
11
12
  end
12
13
 
13
14
  gem_group :test do
@@ -84,8 +85,12 @@ if yes?( "You would like to install angular?" )
84
85
  packages << "angular"
85
86
  end
86
87
 
88
+ if yes?( "You would like to install jazz hands?" )
89
+ generate "happy_seed:jazz_hands"
90
+ packages << "jazz_hands"
91
+ end
92
+
87
93
  puts "Setting up git"
88
94
  git :init
89
95
  git add: "."
90
96
  git commit: "-a -m 'Based off of happy_seed: #{packages.join( ', ')} included'"
91
-
@@ -45,4 +45,4 @@ module HappySeed
45
45
  end
46
46
  end
47
47
  end
48
- end
48
+ end
@@ -4,16 +4,23 @@
4
4
  %title HappySeed Generator setup page
5
5
  %script{:src=>"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"}
6
6
  %link{:href=>"//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css", :rel=>"stylesheet"}
7
+ :css
8
+ #nav { margin-top: 25px; }
9
+ @media (max-width: 768px) {
10
+ .affix {
11
+ position: static;
12
+ }
13
+ }
7
14
 
8
15
  %body
9
16
  .container
10
17
  .row
11
- .col-sm-2
12
- .panel
13
- .panel-header
18
+ .col-sm-3
19
+ .panel.panel-default.affix#nav
20
+ .panel-heading
14
21
  Nav
15
22
  .panel-body
16
- %ul.affix
23
+ %ul.list-unstyled
17
24
  %li
18
25
  %a{ href: "/rails/mailers"}Mailer Previews
19
26
  %li
@@ -21,7 +28,7 @@
21
28
  - @docs.each do |f|
22
29
  %li
23
30
  %a{ href: "##{f[:name]}"}= f[:name]
24
- .col-sm-10
31
+ .col-sm-9
25
32
  / Environment Variables
26
33
  %h3
27
34
  %a{ name: "env" }Environment Variables
@@ -34,3 +41,5 @@
34
41
  %a{ name: "#{f[:name]}"}= f[:name]
35
42
 
36
43
  ~ f[:html].html_safe
44
+
45
+ %hr
@@ -38,6 +38,10 @@ module HappySeed
38
38
  "config.action_mailer.default_url_options = { host: 'localhost:3000' }"
39
39
  end
40
40
 
41
+ application(nil, env: "test") do
42
+ "config.action_mailer.default_url_options = { host: 'localhost:3000' }"
43
+ end
44
+
41
45
  if File.exists?( File.join( destination_root, 'app/views/application/_header.html.haml' ) )
42
46
  gsub_file 'app/views/application/_header.html.haml', "/ USER NAV", <<-'RUBY'
43
47
  %ul.nav.navbar-nav.navbar-right
@@ -8,13 +8,14 @@
8
8
 
9
9
  .panel-body
10
10
 
11
- = form_for(resource, as: resource_name, url: password_path(resource_name), :html=>{:role=>:form, :class=>'form-horizontal'}) do |f|
11
+ = form_for(resource, as: resource_name, url: password_path(resource_name), :html=>{:role=>:form, :class=>'form-horizontal', method: 'put'}) do |f|
12
12
 
13
13
  = devise_error_messages!
14
+ = f.hidden_field :reset_password_token
14
15
 
15
16
  .form-group
16
17
  = f.label :password, :class=>'control-label col-lg-3'
17
- .col-lg-9= f.password_field :password, autocomplete: "off", :autofocus: true, :class=>'form-control', :placeholder=>'Password'
18
+ .col-lg-9= f.password_field :password, autocomplete: "off", autofocus: true, :class=>'form-control', :placeholder=>'Password'
18
19
 
19
20
  .form-group
20
21
  = f.label :password_confirmation, :class=>'control-label col-lg-3'
@@ -0,0 +1,54 @@
1
+ require 'rails_helper'
2
+
3
+ feature "ForgotPasswords", :type => :feature do
4
+ it "should reset your password" do
5
+ user = create :user
6
+
7
+ visit new_user_password_path
8
+
9
+ within "#new_user" do
10
+ fill_in "user_email", with: user.email
11
+ end
12
+
13
+ click_button "Send me reset password instructions"
14
+
15
+ # puts ActionMailer::Base.deliveries
16
+
17
+ body = ActionMailer::Base.deliveries.last.body
18
+
19
+ md = /(\/users\/password\/edit\?reset.*)"/.match( body.to_s )
20
+ if !md
21
+ assert( false, "URL NOT FOUND IN MESSAGE")
22
+ end
23
+
24
+ visit md[1]
25
+
26
+ within "#new_user" do
27
+ fill_in "user_password", with: "new_password"
28
+ fill_in "user_password_confirmation", with: "new_password"
29
+ end
30
+
31
+ click_button "Change my password"
32
+
33
+ expect( page.body ).to_not include( "Email can't be blank" )
34
+
35
+ visit user_path
36
+
37
+ expect( page.body ).to include( "Sign Out")
38
+
39
+ click_link "Sign Out"
40
+
41
+ expect( page.body ).to include( "Signed out successfully." )
42
+
43
+ visit new_user_session_path
44
+
45
+ within "#new_user" do
46
+ fill_in "user_email", with: user.email
47
+ fill_in "user_password", with: "new_password"
48
+ end
49
+
50
+ click_button "Sign in"
51
+
52
+ expect( page.body ).to include( "Signed in successfully.")
53
+ end
54
+ end
@@ -0,0 +1,30 @@
1
+ module HappySeed
2
+ module Generators
3
+ class JazzHandsGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../templates', __FILE__)
5
+
6
+ def install_jazz_hands
7
+
8
+ gem 'jazz_hands', :github => 'nixme/jazz_hands', :branch => 'bring-your-own-debugger', :groups => [:development, :test]
9
+
10
+ ruby_major_version = RUBY_VERSION.split('.')[0]
11
+
12
+ if ruby_major_version == '1'
13
+ gem 'debugger', :groups => [:development, :test]
14
+ else
15
+ gem 'byebug', :groups => [:development, :test]
16
+ end
17
+
18
+ inside 'config/initializers' do
19
+ copy_file 'jazz_hands.rb'
20
+ end
21
+
22
+ Bundler.with_clean_env do
23
+ run "bundle install"
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ if defined?(JazzHands)
2
+ JazzHands.colored_prompt = true
3
+ # Uncomment for MRI 1.9.3 or 2.0.0
4
+ # JazzHands.enable_syntax_highlighting_as_you_type!
5
+ end
@@ -0,0 +1,30 @@
1
+ HappySeed Jazz Hands Install
2
+ ====================
3
+
4
+ ### What does this do?
5
+
6
+ * Installs jazz_hands gen
7
+
8
+ ### Why do you want this?
9
+
10
+ As per the jazz_hands repo https://github.com/nixme/jazz_hands
11
+
12
+ Spending hours in the rails console? Spruce it up and show off those hard-working hands!
13
+
14
+ jazz_hands is an opinionated set of console-related gems and a bit of glue
15
+
16
+ ### Good to know
17
+
18
+ The debugger gem works for 1.8 and 1.9 Ruby. But not for > 2.0.
19
+
20
+ It is recommended to use byebug or debugger2 for Ruby > 2.0
21
+
22
+ If any one has problems with spring loading on Rails 4, then we recommend restarting spring
23
+
24
+ ```
25
+ bin/spring stop
26
+ ```
27
+
28
+ ### What needs to be done?
29
+
30
+ na
@@ -1,3 +1,3 @@
1
1
  module HappySeed
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -0,0 +1,5 @@
1
+ if defined?(JazzHands)
2
+ JazzHands.colored_prompt = true
3
+ # Uncomment for MRI 1.9.3 or 2.0.0
4
+ # JazzHands.enable_syntax_highlighting_as_you_type!
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: happy_seed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Schenk
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-31 00:00:00.000000000 Z
12
+ date: 2014-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -112,12 +112,16 @@ files:
112
112
  - lib/generators/happy_seed/devise/templates/app/views/devise/sessions/new.html.haml
113
113
  - lib/generators/happy_seed/devise/templates/docs/README.03.devise.rdoc
114
114
  - lib/generators/happy_seed/devise/templates/spec/factories/users.rb
115
+ - lib/generators/happy_seed/devise/templates/spec/features/forgot_password_spec.rb
115
116
  - lib/generators/happy_seed/devise/templates/test/mailers/previews/devise_preview.rb
116
117
  - lib/generators/happy_seed/facebook/facebook_generator.rb
117
118
  - lib/generators/happy_seed/facebook/templates/docs/README.06.facebook.rdoc
118
119
  - lib/generators/happy_seed/happy_seed_generator.rb
119
120
  - lib/generators/happy_seed/instagram/instagram_generator.rb
120
121
  - lib/generators/happy_seed/instagram/templates/docs/README.05.instagram.rdoc
122
+ - lib/generators/happy_seed/jazz_hands/jazz_hands_generator.rb
123
+ - lib/generators/happy_seed/jazz_hands/templates/config/initializers/jazz_hands.rb
124
+ - lib/generators/happy_seed/jazz_hands/templates/docs/README.12.jazz_hands.rdoc
121
125
  - lib/generators/happy_seed/omniauth/omniauth_generator.rb
122
126
  - lib/generators/happy_seed/omniauth/templates/add_name_to_users.rb
123
127
  - lib/generators/happy_seed/omniauth/templates/app/controllers/omniauth_callbacks_controller.rb
@@ -173,6 +177,7 @@ files:
173
177
  - test/dummy/config/initializers/cookies_serializer.rb
174
178
  - test/dummy/config/initializers/filter_parameter_logging.rb
175
179
  - test/dummy/config/initializers/inflections.rb
180
+ - test/dummy/config/initializers/jazz_hands.rb
176
181
  - test/dummy/config/initializers/mime_types.rb
177
182
  - test/dummy/config/initializers/session_store.rb
178
183
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -233,6 +238,7 @@ test_files:
233
238
  - test/dummy/config/initializers/cookies_serializer.rb
234
239
  - test/dummy/config/initializers/filter_parameter_logging.rb
235
240
  - test/dummy/config/initializers/inflections.rb
241
+ - test/dummy/config/initializers/jazz_hands.rb
236
242
  - test/dummy/config/initializers/mime_types.rb
237
243
  - test/dummy/config/initializers/session_store.rb
238
244
  - test/dummy/config/initializers/wrap_parameters.rb