blueberry_rails 0.2.4 → 0.3.0

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: 59248038b12c11a1eaeffea38a92e4f02d963945
4
- data.tar.gz: 84ba9261858f12a05637ae4cf28bd21391df0342
3
+ metadata.gz: 91ddc717f2b358fbe8ac773d2ad9e0a861e00eef
4
+ data.tar.gz: d45f1472dd712f6c14146abd46eb925be9e3dc96
5
5
  SHA512:
6
- metadata.gz: d88ae47ab45dc691be0793ea076c0cdeb0cb72165fa9ad9772e076364729bbdfa561b4a0c80dda8990ced0679948e98528a5a374e21b6df83b6498eb6f8616f7
7
- data.tar.gz: 5f9b9e5c529fcd8d09f44478b5bfcf2c14b4305855983452f018c11a9c86498152c4a143d5ead32e794755dcdd8487158d5006accd9fec91cf9b43e6ea86c30b
6
+ metadata.gz: 990e38a3acca0d77c0d7e852297e30591b0728153fdaf79e5add3af3e806c20c722d48c2738f3a11b1e8de3841e1e962fd4dbd739d346b65acbc882e1d8d9a3d
7
+ data.tar.gz: ce78aef6ea838f748c008f7c0cff60d68bb0e4c72efec2c20873b9cc6cd3a1dc440dc1dd883c1b955ed5890a8e3e639fc1c3b020e9f76e30828da816131c8c57
data/.travis.yml CHANGED
@@ -3,6 +3,7 @@ script: 'bundle exec rake'
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
+ - 2.1.1
6
7
  before_install:
7
8
  - gem update --system
8
9
 
@@ -19,10 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_dependency 'bundler', '~> 1.3'
22
- spec.add_dependency 'rails', '4.0.3'
22
+ spec.add_dependency 'rails', '4.1.0'
23
23
 
24
24
  spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'minitest', '~> 4.7'
26
25
 
27
26
  spec.required_ruby_version = '>= 1.9.2'
28
27
 
@@ -122,13 +122,19 @@ module BlueberryRails
122
122
  end
123
123
 
124
124
  def add_ruby_version_file
125
- add_file '.ruby-version', "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
125
+ current_version = RUBY_VERSION.split('.').map(&:to_i)
126
+ version = if current_version[0] >= 2 && current_version[1] >= 0
127
+ RUBY_VERSION
128
+ else
129
+ "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
130
+ end
131
+ add_file '.ruby-version', version
126
132
  end
127
133
 
128
134
  def remove_routes_comment_lines
129
135
  replace_in_file 'config/routes.rb',
130
- /Application\.routes\.draw do.*end/m,
131
- "Application.routes.draw do\nend"
136
+ /Rails.application\.routes\.draw do.*end/m,
137
+ "Rails.application.routes.draw do\nend"
132
138
  end
133
139
 
134
140
  def install_devise
@@ -137,7 +143,7 @@ module BlueberryRails
137
143
  remove_routes_comment_lines
138
144
  inject_into_file 'config/routes.rb',
139
145
  " root to: 'root#index'\n",
140
- after: "#{app_const}.routes.draw do\n"
146
+ after: "Rails.application.routes.draw do\n"
141
147
  if options[:devise_model].present?
142
148
  generate 'devise', options[:devise_model]
143
149
  end
@@ -4,20 +4,25 @@ require 'rails/generators/rails/app/app_generator'
4
4
  module BlueberryRails
5
5
  class AppGenerator < Rails::Generators::AppGenerator
6
6
 
7
- class_option :database, :type => :string, :aliases => '-d', :default => 'postgresql',
8
- :esc => "Preconfigure for selected database (options: #{DATABASES.join('/')})"
7
+ class_option :database, :type => :string, :aliases => '-d',
8
+ :default => 'postgresql',
9
+ :desc => "Preconfigure for selected database " +
10
+ "(options: #{DATABASES.join('/')})"
9
11
 
10
12
  # class_option :github, :type => :string, :aliases => '-G', :default => nil,
11
13
  # :desc => 'Create Github repository and add remote origin pointed to repo'
12
14
 
15
+ class_option :bootstrap, :type => :boolean, :aliases => '-b',
16
+ :default => false, :desc => 'Include bootstrap 3'
17
+
13
18
  class_option :devise, :type => :boolean, :aliases => '-D', :default => true,
14
19
  :desc => 'Include and generate devise'
15
20
 
16
- class_option :devise_model, :type => :string, :aliases => '-M', :default => 'User',
17
- :desc => 'Name of devise model to generate'
21
+ class_option :devise_model, :type => :string, :aliases => '-M',
22
+ :default => 'User', :desc => 'Name of devise model to generate'
18
23
 
19
- class_option :skip_test_unit, :type => :boolean, :aliases => '-T', :default => true,
20
- :desc => 'Skip Test::Unit files'
24
+ class_option :skip_test_unit, :type => :boolean, :aliases => '-T',
25
+ :default => true, :desc => 'Skip Test::Unit files'
21
26
 
22
27
  def finish_template
23
28
  invoke :blueberry_customization
@@ -1,3 +1,3 @@
1
1
  module BlueberryRails
2
- VERSION = "0.2.4"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -17,23 +17,27 @@ class BlueberryRailsTest < Minitest::Unit::TestCase
17
17
  restore_env
18
18
  end
19
19
 
20
- def test_rake_runs_cleanly_first
20
+ def test_rake_runs_cleanly
21
21
  create_project 'test_project'
22
22
  assert run_rake('test_project')
23
23
  end
24
24
 
25
+ def test_rake_runs_cleanly_with_bootstrap_option
26
+ create_project 'test_project', '--bootstrap'
27
+ assert run_rake('test_project')
28
+ end
29
+
25
30
  protected
26
31
 
27
- def create_project(project_name)
32
+ def create_project(project_name, options = nil)
28
33
  bin = File.expand_path(File.join('..', 'bin', 'blueberry_rails'), File.dirname(__FILE__))
29
- cmd "#{bin} #{project_name}"
34
+ cmd "#{bin} #{project_name} #{options}"
30
35
  end
31
36
 
32
37
  def run_rake(project_name)
33
38
  Dir.chdir(project_name) do
34
39
  cmd 'bundle exec rake db:create'
35
40
  cmd 'bundle exec rake db:migrate'
36
- cmd 'bundle exec rake db:test:prepare'
37
41
  cmd('bundle exec rake')
38
42
  end
39
43
  end
@@ -1,6 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'airbrake'
4
+ <% if options[:bootstrap] -%>
5
+ gem 'bootstrap-sass'
6
+ <% end -%>
4
7
  gem 'coffee-rails', '~> 4.0.0'
5
8
  <% if options[:devise] -%>
6
9
  gem 'devise'
@@ -9,14 +12,15 @@ gem 'dotenv-rails'
9
12
  gem 'flutie'
10
13
  gem 'jquery-rails'
11
14
  gem 'pg'
12
- gem 'rails', '~> 4.0.3'
13
- gem 'sass-rails', '~> 4.0.0'
15
+ gem 'rails', '~> 4.1.1'
16
+ gem 'sass-rails', '~> 4.0.3'
14
17
  gem 'simple_form'
15
18
  gem 'slim-rails'
16
19
  gem 'uglifier', '>= 1.3.0'
17
20
 
18
21
  group :development do
19
22
  gem 'better_errors'
23
+ gem 'binding_of_caller'
20
24
  gem 'capistrano', '~> 3.0.0'
21
25
  gem 'capistrano-bundler'
22
26
  gem 'capistrano-rails'
@@ -24,6 +28,7 @@ group :development do
24
28
  gem 'guard-rspec'
25
29
  gem 'mailcatcher'
26
30
  gem 'pry-rails'
31
+ gem 'spring'
27
32
  end
28
33
 
29
34
  group :development, :test do
@@ -3,7 +3,7 @@ html
3
3
  head
4
4
  title= page_title
5
5
  meta charset="utf-8"
6
- = stylesheet_link_tag :application, :media => 'all'
6
+ = stylesheet_link_tag :application, media: 'all'
7
7
  = csrf_meta_tags
8
8
 
9
9
  body class=body_class
@@ -10,6 +10,8 @@ require 'capybara/poltergeist'
10
10
 
11
11
  Dir[Rails.root.join('spec/support/**/*.rb')].each { |file| require file }
12
12
 
13
+ ActiveRecord::Migration.maintain_test_schema!
14
+
13
15
  RSpec.configure do |config|
14
16
  config.expect_with :rspec do |c|
15
17
  c.syntax = :expect
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueberry_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlueberryApps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-08 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.3
33
+ version: 4.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.0.3
40
+ version: 4.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '4.7'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '4.7'
69
55
  description: 'A Rails app template by BlueberryApps '
70
56
  email:
71
57
  - jzajpt@blueberry.cz
@@ -127,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
113
  version: '0'
128
114
  requirements: []
129
115
  rubyforge_project:
130
- rubygems_version: 2.2.0
116
+ rubygems_version: 2.2.2
131
117
  signing_key:
132
118
  specification_version: 4
133
119
  summary: A Rails app template by BlueberryApps