codeland-starter 0.0.1 → 0.1.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: 1a0761709a566e84eed90a0bf8b683b2c4efff22
4
- data.tar.gz: 56715ca2a83973b2080407a3d444ab3e8d3cf59a
3
+ metadata.gz: 3c1d94d3918154b96129cfa2df0e5cb8c026d3c3
4
+ data.tar.gz: f53705e4b7049dc7d66e762c29d69bd318af5a80
5
5
  SHA512:
6
- metadata.gz: 6f8ad127cb38e128bd40e01e5e7fef25503866d1c1391e71defbeb0518dccad782ede7918f8f342457c69fb07a1018b4ffb70ae70cb1d572b099537bf0caa8ce
7
- data.tar.gz: 7a14a157d8cd0c05ba30c79b0b92ca3bd8d7ff7df0f3b34ac0dca461a6d733c7f13ec7ee637aea532ced01df6aae7660827876ec9a49cce65d26408456aa1842
6
+ metadata.gz: 241405887b27f75e9d1d5e36f177677b9de8d0c214cd3d3a6b40b54af44dad88b2df738c142761cd877e41a4ba963faa14b9be7d71ab6ed2a2c4001d6ed6d10d
7
+ data.tar.gz: a45a8326e905c027838650eab1d7da087b067edaec43eb1464ed9eea1d5972b1740da46d914c8c0b99031c4114ceff7d1b0a4a95bc3783406987ebd1a0d4b2b7
@@ -4,3 +4,4 @@ rvm:
4
4
  - 2.0.0
5
5
  - 2.1.1
6
6
  - 2.1.2
7
+ - 2.2
@@ -0,0 +1,11 @@
1
+ # v0.1.0
2
+
3
+ - Update gem versions
4
+ - Add heroku collaborators
5
+ - Remove Machinist in favor of FactoryGirl
6
+ - Add rack-mini-profiler, draper and dotenv-rails gems
7
+ - Recommend Ruby 2.2 or higher
8
+
9
+ # v0.0.1
10
+
11
+ - Initial release
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Codeland::Starter
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/codeland-starter.svg)](http://badge.fury.io/rb/codeland-starter)
3
4
  [![Code Climate](https://codeclimate.com/github/codelandev/codeland-starter/badges/gpa.svg)](https://codeclimate.com/github/codelandev/codeland-starter) [![Build Status](https://travis-ci.org/codelandev/codeland-starter.svg?branch=master)](https://travis-ci.org/codelandev/codeland-starter) [![Test Coverage](https://codeclimate.com/github/codelandev/codeland-starter/badges/coverage.svg)](https://codeclimate.com/github/codelandev/codeland-starter)
4
5
 
5
6
  Create [Ruby on Rails](http://rubyonrails.org/) projects based on [Codeland's](http://codeland.com.br) template with [integrations](#integrations).
@@ -32,6 +33,39 @@ integrations:
32
33
  $ codeland-starter create ProjectName
33
34
  ```
34
35
 
36
+ ## What do you (can) get?
37
+
38
+ - PostgreSQL
39
+ - Ruby version in Gemfile
40
+ - [Slim](http://slim-lang.com/)
41
+ - Skip Rails generators (javascripts, stylesheets, helpers)
42
+ - Brazilian time and locale
43
+ - Front-end setup
44
+ - [Heroku](https://www.heroku.com/) setup
45
+ - Gems:
46
+ - [RSpec](http://rspec.info/)
47
+ - [Factory girl](https://github.com/thoughtbot/factory_girl_rails)
48
+ - [Simplecov](https://github.com/colszowka/simplecov)
49
+ - [Database cleaner](https://github.com/DatabaseCleaner/database_cleaner)
50
+ - [Shoulda matchers](https://github.com/thoughtbot/shoulda-matchers)
51
+ - [Cabybara](http://jnicklas.github.io/capybara/)
52
+ - [Selenium](https://rubygems.org/gems/selenium-webdriver)
53
+ - [Initjs](https://github.com/josemarluedke/initjs)
54
+ - [Rails-i18n](https://github.com/svenfuchs/rails-i18n)
55
+ - [Devise](https://github.com/plataformatec/devise)
56
+ - [ActiveAdmin](https://github.com/gregbell/active_admin)
57
+ - [Simpleform](https://github.com/plataformatec/simple_form)
58
+ - [Pundit](https://github.com/elabs/pundit)
59
+ - [Autoprefixer-rails](https://github.com/ai/autoprefixer-rails)
60
+ - [Bootstrap](https://github.com/twbs/bootstrap-sass)
61
+ - [Font-awesome](https://github.com/bokmann/font-awesome-rails)
62
+ - [NProgress](https://github.com/caarlos0/nprogress-rails)
63
+ - [Draper](https://github.com/drapergem/draper)
64
+ - [Rails 12factor](https://github.com/heroku/rails_12factor)
65
+ - [Thin](http://code.macournoyer.com/thin/) (development)
66
+ - [Rack Profiler](https://github.com/MiniProfiler/rack-mini-profiler) (development)
67
+ - [Passenger](https://www.phusionpassenger.com/) (production)
68
+
35
69
  ## Integrations
36
70
 
37
71
  ### Heroku
@@ -40,13 +74,24 @@ $ codeland-starter create ProjectName
40
74
  $ heroku plugins:install git@github.com:heroku/heroku-oauth.git
41
75
  $ heroku authorizations:create -d "some text"
42
76
  ```
43
- Paste the `Token` in
77
+ Paste the `Token` in `codeland-starter.yml`
44
78
 
45
79
  ```yaml
46
80
  heroku:
47
81
  oauth_token: PASTE-YOUR-TOKEN-HERE
48
82
  ```
49
83
 
84
+ #### Collaborators
85
+
86
+ Has a team? List them as an array in `codeland-starter.yml`
87
+ ```yaml
88
+ heroku:
89
+ users:
90
+ - contato@codeland.com.br
91
+ - another@email.com
92
+ - email@example.com
93
+ ```
94
+
50
95
  ## Contributing
51
96
 
52
97
  1. Fork it ( https://github.com/codelandev/codeland-starter/fork )
@@ -28,6 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency 'webmock', '~> 1.20.3'
29
29
  spec.add_development_dependency 'simplecov', '~> 0.9.1'
30
30
  spec.add_development_dependency 'simplecov-console'
31
- spec.add_development_dependency 'pry'
32
31
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4.1'
33
32
  end
@@ -10,7 +10,11 @@ module Codeland
10
10
  ROOT_PATH = File.join(File.dirname(__FILE__), '..', '..')
11
11
 
12
12
  class << self
13
- attr_reader :name, :config
13
+ attr_reader :name
14
+
15
+ def config
16
+ @config ||= Configuration.new
17
+ end
14
18
 
15
19
  def create_project(name, yaml_file)
16
20
  @name = name
@@ -3,3 +3,5 @@ integrations:
3
3
 
4
4
  heroku:
5
5
  oauth_token: 'YOUR-TOKEN'
6
+ users:
7
+ - my@example.com
@@ -8,8 +8,8 @@ module Codeland
8
8
 
9
9
  DEFAULT_FILENAME = 'codeland-starter.yml'
10
10
 
11
- def initialize(yaml_file)
12
- @yaml = if File.exists?(yaml_file)
11
+ def initialize(yaml_file = nil)
12
+ @yaml = if yaml_file && File.exists?(yaml_file)
13
13
  YAML.load_file(File.open(yaml_file))
14
14
  elsif File.exists?(default_yaml_file)
15
15
  YAML.load_file(File.open(default_yaml_file))
@@ -36,7 +36,10 @@ module Codeland
36
36
  @app = create_random_app
37
37
  @success = true
38
38
  ensure
39
- add_git_remote
39
+ if success?
40
+ add_git_remote
41
+ add_collaborators
42
+ end
40
43
  end
41
44
  end
42
45
 
@@ -66,7 +69,7 @@ module Codeland
66
69
  api.app.create({
67
70
  :name => app_name,
68
71
  :region => 'us',
69
- :stack => 'cedar'
72
+ :stack => 'cedar-14'
70
73
  })
71
74
  end
72
75
 
@@ -79,7 +82,21 @@ module Codeland
79
82
  end
80
83
 
81
84
  def add_git_remote
82
- system("git remote add heroku #{app['git_url']}") if success?
85
+ system("git remote add heroku #{app['git_url']}")
86
+ end
87
+
88
+ def add_collaborators
89
+ users = Configuration['heroku']['users']
90
+ if users && users.is_a?(Array)
91
+ users.each do |user|
92
+ begin
93
+ api.collaborator.create(app['id'], { :user => user })
94
+ puts "Collaborator #{user} was added"
95
+ rescue Excon::Errors::UnprocessableEntity
96
+ puts "Collaborator #{user} was not added"
97
+ end
98
+ end
99
+ end
83
100
  end
84
101
  end
85
102
  end
@@ -1,5 +1,5 @@
1
1
  module Codeland
2
2
  module Starter
3
- VERSION = "0.0.1"
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
@@ -0,0 +1 @@
1
+ [{"created_at"=>"2014-07-12T23:04:58Z", "id"=>"some-valid-id", "updated_at"=>"2014-07-12T23:04:58Z", "user"=>{"id"=>"some-user-id-here", "email"=>"my@email.com"}, "role"=>"owner"}]
@@ -15,7 +15,11 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formaters]
15
15
  SimpleCov.start
16
16
 
17
17
  require 'webmock/rspec'
18
- WebMock.disable_net_connect!(:allow => 'codeclimate.com') if ENV['CI']
18
+ if ENV['CI']
19
+ WebMock.disable_net_connect!(:allow => 'codeclimate.com')
20
+ else
21
+ WebMock.disable_net_connect!
22
+ end
19
23
  require 'codeland/starter'
20
24
 
21
25
  # This file was generated by the `rspec --init` command. Conventionally, all
@@ -4,7 +4,7 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
4
4
  def stub_heroku(content = nil, status = 201, app_name = name)
5
5
  stub_request(:post, 'https://api.heroku.com/apps')
6
6
  .with(
7
- :body => { :name => name, :region => 'us', :stack => 'cedar' },
7
+ :body => { :name => name, :region => 'us', :stack => 'cedar-14' },
8
8
  :headers => {
9
9
  'Accept' => 'application/vnd.heroku+json; version=3',
10
10
  'Authorization' => "Bearer #{heroku_token}",
@@ -18,7 +18,35 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
18
18
  def stub_heroku_error(error, app_name = name)
19
19
  stub_request(:post, 'https://api.heroku.com/apps')
20
20
  .with(
21
- :body => { :name => app_name, :region => 'us', :stack => 'cedar' },
21
+ :body => { :name => app_name, :region => 'us', :stack => 'cedar-14' },
22
+ :headers => {
23
+ 'Accept' => 'application/vnd.heroku+json; version=3',
24
+ 'Authorization' => "Bearer #{heroku_token}",
25
+ 'Content-Type' => 'application/json',
26
+ 'Host' => 'api.heroku.com:443',
27
+ 'User-Agent' => "excon/#{Excon::VERSION}"
28
+ }
29
+ ).to_raise(error)
30
+ end
31
+
32
+ def stub_heroku_collaborator(content = nil, status = 201, user)
33
+ stub_request(:post, 'https://api.heroku.com/apps/id/collaborators')
34
+ .with(
35
+ :body => { :user => user },
36
+ :headers => {
37
+ 'Accept' => 'application/vnd.heroku+json; version=3',
38
+ 'Authorization' => "Bearer #{heroku_token}",
39
+ 'Content-Type' => 'application/json',
40
+ 'Host' => 'api.heroku.com:443',
41
+ 'User-Agent' => "excon/#{Excon::VERSION}"
42
+ }
43
+ ).to_return(:status => status, :body => content)
44
+ end
45
+
46
+ def stub_heroku_collaborator_error(error, email)
47
+ stub_request(:post, 'https://api.heroku.com/apps/id/collaborators')
48
+ .with(
49
+ :body => { :user => email },
22
50
  :headers => {
23
51
  'Accept' => 'application/vnd.heroku+json; version=3',
24
52
  'Authorization' => "Bearer #{heroku_token}",
@@ -35,6 +63,10 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
35
63
  File.open(File.dirname(__FILE__) + '/../../fixtures/heroku_app.json', 'rb')
36
64
  end
37
65
 
66
+ let!(:heroku_collaborator_file) do
67
+ File.open(File.dirname(__FILE__) + '/../../fixtures/heroku_collaborator.json', 'rb')
68
+ end
69
+
38
70
  let!(:installed_yaml) { File.join(File.dirname(__FILE__), '..', '..', '..', 'lib', 'codeland', 'starter', 'codeland-starter.yml') }
39
71
 
40
72
 
@@ -43,7 +75,7 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
43
75
 
44
76
  context 'api' do
45
77
  context 'with heroku key in YAML' do
46
- before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token}) }
78
+ before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token, 'users' => ['email@example.com']}) }
47
79
 
48
80
  it 'sets @api' do
49
81
  expected_kind = PlatformAPI::Client
@@ -75,7 +107,7 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
75
107
  let!(:name) { 'MyAppName' }
76
108
  before { stub_heroku_error(Excon::Errors::Unauthorized) }
77
109
  before { expect(Codeland::Starter).to receive(:config).and_return(Codeland::Starter::Configuration.new(installed_yaml)) }
78
- before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token}) }
110
+ before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token, 'users' => ['email@example.com']}) }
79
111
  before { allow_any_instance_of(described_class).to receive(:add_git_remote).and_return(nil) }
80
112
 
81
113
  it 'raises MissingYAML' do
@@ -87,13 +119,15 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
87
119
  subject { described_class.new }
88
120
  let!(:name) { 'codeland' }
89
121
  before do
90
- expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token})
122
+ expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token, 'users' => ['email@example.com']})
91
123
  error = Excon::Errors::UnprocessableEntity.new("UnprocessableEntity")
124
+ stub_heroku_collaborator(heroku_collaborator_file, 201, 'email@example.com')
92
125
  stub_heroku_error(error, name)
93
126
  stub_heroku(heroku_file, 201, nil)
94
127
  is_expected.to receive(:create_app).with(name).once.and_raise(error)
95
128
  is_expected.to receive(:create_app).with(no_args).once
96
129
  allow_any_instance_of(described_class).to receive(:add_git_remote).and_return(nil)
130
+ allow_any_instance_of(described_class).to receive(:add_collaborators).and_return(nil)
97
131
  end
98
132
 
99
133
  it 'calls create with empty name' do
@@ -102,27 +136,34 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
102
136
  end
103
137
 
104
138
  context 'app with new unique name' do
105
- before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(2).times.and_return({'oauth_token' => heroku_token}) }
106
- before { stub_heroku(heroku_file) }
139
+ before do
140
+ stub_heroku(heroku_file)
141
+ end
107
142
 
108
143
  subject { described_class.new }
109
144
 
110
145
  let!(:name) { 'new-app-for-codeland' }
111
146
 
112
147
  context 'returned json have some keys' do
113
- before { subject.create }
114
- before { allow_any_instance_of(described_class).to receive(:add_git_remote).and_return(nil) }
148
+ before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(3).times.and_return({'oauth_token' => heroku_token, 'users' => ['email@example.com']}) }
149
+ before do
150
+ stub_heroku_collaborator(heroku_collaborator_file, 201, 'email@example.com')
151
+ subject.create
152
+ allow_any_instance_of(described_class).to receive(:add_git_remote).and_return(nil)
153
+ end
115
154
 
116
155
  %w(git_url id name web_url).each do |key|
117
156
  it "includes #{key} key" do
118
- expect(JSON.parse(subject.app)).to have_key('id')
157
+ expect(JSON.parse(subject.app)).to have_key(key)
119
158
  end
120
159
  end
121
160
  end
122
161
 
123
162
  context 'git remote' do
163
+ before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(3).times.and_return({'oauth_token' => heroku_token, 'users' => ['email@example.com']}) }
124
164
  before do
125
165
  expected = "git remote add heroku git_url"
166
+ stub_heroku_collaborator(heroku_collaborator_file, 201, 'email@example.com')
126
167
  expect(subject).to receive(:system).with(expected).once
127
168
  end
128
169
 
@@ -130,6 +171,45 @@ RSpec.describe Codeland::Starter::Integrations::Heroku do
130
171
  subject.create
131
172
  end
132
173
  end
174
+
175
+ context 'collaborators' do
176
+ context 'with collaborators' do
177
+ before { expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(3).times.and_return({'oauth_token' => heroku_token, 'users' => ['email@example.com']}) }
178
+
179
+ context 'success' do
180
+ before do
181
+ stub_heroku_collaborator(heroku_collaborator_file, 201, 'email@example.com')
182
+ expect_any_instance_of(PlatformAPI::Collaborator).to receive(:create).with('id', { :user => 'email@example.com'}).once
183
+ end
184
+
185
+ it 'calls api.collaborator.create' do
186
+ subject.create
187
+ end
188
+ end
189
+
190
+ context 'error' do
191
+ before do
192
+ error = Excon::Errors::UnprocessableEntity.new("UnprocessableEntity")
193
+ stub_heroku_collaborator_error(error, 'email@example.com')
194
+ expect(STDOUT).to receive(:puts).with('Collaborator email@example.com was not added')
195
+ end
196
+
197
+ it 'calls api.collaborator and not add user' do
198
+ subject.create
199
+ end
200
+ end
201
+ end
202
+
203
+ context 'without collaborators' do
204
+ before do
205
+ expect(Codeland::Starter::Configuration).to receive(:[]).with('heroku').exactly(3).times.and_return({'oauth_token' => heroku_token})
206
+ end
207
+
208
+ it 'not calls api.collaborator' do
209
+ subject.create
210
+ end
211
+ end
212
+ end
133
213
  end
134
214
  end
135
215
 
@@ -14,7 +14,7 @@ git :add => '.'
14
14
  git :commit => %Q{ -m 'Initial commit' --quiet }
15
15
 
16
16
  # Ruby and Rails check
17
- if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.0')
17
+ if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.2')
18
18
  if yes?("You are using #{RUBY_VERSION}. Is the version of the project?")
19
19
  insert_into_file 'Gemfile', "ruby '#{RUBY_VERSION}'\n", :after => "source 'https://rubygems.org'\n\n"
20
20
  end
@@ -24,19 +24,29 @@ else
24
24
  puts 'Please upgrade to ruby 2.2 or more'
25
25
  end
26
26
 
27
+ gem_group :development do
28
+ gem 'rack-mini-profiler'
29
+ gem 'letter_opener'
30
+ end
31
+
27
32
  gem_group :development, :test do
28
33
  unless rails_4?
29
- gem 'pry-rails', '~> 0.3.2'
34
+ gem 'pry-rails', '~> 0.3.4'
30
35
  end
31
- gem 'machinist', '~> 2.0'
32
- gem 'rspec-rails', '~> 3.2.0'
36
+ gem 'factory_girl_rails', '~> 4.5.0'
37
+ gem 'rspec-rails', '~> 3.3.3'
33
38
  gem 'awesome_print', '~> 1.6.1', :require => false
34
39
  gem 'spring-commands-rspec', '~> 1.0.4'
35
40
  gem 'thin', '~> 1.6.3'
41
+ gem 'dotenv-rails', '~> 2.0.2'
36
42
  end
37
43
 
44
+ create_file '.env'
45
+ create_file '.env.example'
46
+ append_to_file '.gitignore', ".env\n"
47
+
38
48
  gem_group :test do
39
- gem 'simplecov', '~> 0.9.2', :require => false
49
+ gem 'simplecov', '~> 0.10.0', :require => false
40
50
  gem 'database_cleaner', '~> 1.4.1'
41
51
  gem 'shoulda-matchers', '~> 2.8.0', :require => false
42
52
  gem 'capybara'
@@ -44,7 +54,6 @@ gem_group :test do
44
54
  end
45
55
  run 'bundle install --quiet'
46
56
  run 'bundle exec spring binstub rspec'
47
- generate :'machinist:install'
48
57
  generate :'rspec:install'
49
58
  inside 'spec' do
50
59
  insert_into_file 'rails_helper.rb', "\nrequire 'shoulda-matchers'", :after => "require 'rspec/rails'"
@@ -85,7 +94,7 @@ config.generators do |g|
85
94
  g.test_framework :rspec,
86
95
  view_specs: false,
87
96
  helper_specs: false
88
- g.fixtures_replacement :machinist
97
+ g.factory_girl true
89
98
  end
90
99
  CONFIG
91
100
  git :add => '.'
@@ -122,13 +131,14 @@ git :commit => %Q{ -m 'Install Rails-i18n' --quiet }
122
131
  gem 'slim-rails', '~> 3.0.1'
123
132
  run 'bundle install --quiet'
124
133
  application %Q(config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }), :env => 'development'
134
+ application 'config.action_mailer.delivery_method = :letter_opener', :env => 'development'
125
135
  application 'Slim::Engine.set_options pretty: true', :env => 'development'
126
136
  git :add => '.'
127
137
  git :commit => %Q{ -m 'Install Slim-rails' --quiet }
128
138
 
129
139
  if yes?('Install Devise?')
130
- gem 'devise', '~> 3.4.1'
131
- gem 'devise-i18n'
140
+ gem 'devise', '~> 3.5.2'
141
+ gem 'devise-i18n', '~> 0.12.1'
132
142
  run 'bundle install --quiet'
133
143
  generate :'devise:install'
134
144
  git :add => '.'
@@ -136,7 +146,7 @@ if yes?('Install Devise?')
136
146
  end
137
147
 
138
148
  if yes?('Install ActiveAdmin?')
139
- gem 'activeadmin', :github => 'gregbell/active_admin'
149
+ gem 'activeadmin', :github => 'activeadmin'
140
150
  run 'bundle install --quiet'
141
151
  generate :'active_admin:install'
142
152
  git :add => '.'
@@ -153,7 +163,7 @@ if yes?('Install Simpleform?')
153
163
  end
154
164
 
155
165
  if yes?('Install Pundit?')
156
- gem 'pundit', '~> 0.3.0'
166
+ gem 'pundit', '~> 1.0.1'
157
167
  run 'bundle install --quiet'
158
168
  generate :'pundit:install'
159
169
  inside 'app' do
@@ -165,21 +175,25 @@ if yes?('Install Pundit?')
165
175
  private
166
176
 
167
177
  def user_not_authorized
168
- flash[:error] = "Você não tem permissão para fazer isso."
178
+ flash[:alert] = "Você não tem permissão para fazer isso."
169
179
  redirect_to(request.referrer || root_path)
170
180
  end
171
181
  ', :after => "protect_from_forgery with: :exception\n"
172
182
  end
173
183
  end
184
+ inside 'spec' do
185
+ insert_into_file 'rails_helper.rb', "\nrequire 'pundit/rspec'", :after => "require 'shoulda-matchers'"
186
+ end
174
187
  git :add => '.'
175
188
  git :commit => %Q{ -m 'Install Pundit' --quiet }
176
189
  end
177
190
 
178
191
  # Front-end stuffs
179
192
 
180
- gem 'autoprefixer-rails'
181
- gem 'bootstrap-sass', '~> 3.3.3'
182
- gem 'font-awesome-rails'
193
+ gem 'autoprefixer-rails', '~> 5.2.1'
194
+ gem 'bootstrap-sass', '~> 3.3.5'
195
+ gem 'font-awesome-rails', '~> 4.4.0'
196
+ gem 'draper', '~> 1.3'
183
197
  run 'bundle install --quiet'
184
198
 
185
199
  inside 'app' do
@@ -194,13 +208,23 @@ inside 'app' do
194
208
  end
195
209
  end
196
210
 
211
+ empty_directory 'decorators' do
212
+ create_file '.keep'
213
+ end
214
+
197
215
  inside 'views' do
198
216
  directory 'partials'
199
217
  end
200
218
  end
201
219
 
220
+ inside 'spec' do
221
+ empty_directory 'decorators' do
222
+ create_file '.keep'
223
+ end
224
+ end
225
+
202
226
  if yes?('Install NProgress?')
203
- gem 'nprogress-rails'
227
+ gem 'nprogress-rails', '~> 0.1.6'
204
228
  run 'bundle install --quiet'
205
229
  inside 'app' do
206
230
  inside 'assets' do
@@ -7,5 +7,5 @@
7
7
  setTimeout( ->
8
8
  $('.flash').slideUp()
9
9
  , 5000)
10
- $(document).click ->
10
+ $(document).one 'click', ->
11
11
  $('.flash').slideUp()
@@ -5,7 +5,7 @@
5
5
  @import "base/variables";
6
6
  @import "base/variables-colors";
7
7
  @import "base/base";
8
- @import "base/typograph";
8
+ @import "base/typography";
9
9
  @import "base/utility";
10
10
 
11
11
  // ==== Atoms
@@ -15,4 +15,4 @@
15
15
 
16
16
  // ==== Organisms
17
17
  @import "organisms/header";
18
- @import "organisms/sidebar";
18
+ @import "organisms/footer";
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeland-starter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sérgio Schnorr Júnior
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-15 00:00:00.000000000 Z
12
+ date: 2015-09-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: platform-api
@@ -137,20 +137,6 @@ dependencies:
137
137
  - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
- - !ruby/object:Gem::Dependency
141
- name: pry
142
- requirement: !ruby/object:Gem::Requirement
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- version: '0'
147
- type: :development
148
- prerelease: false
149
- version_requirements: !ruby/object:Gem::Requirement
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- version: '0'
154
140
  - !ruby/object:Gem::Dependency
155
141
  name: codeclimate-test-reporter
156
142
  requirement: !ruby/object:Gem::Requirement
@@ -177,6 +163,7 @@ files:
177
163
  - ".gitignore"
178
164
  - ".rspec"
179
165
  - ".travis.yml"
166
+ - CHANGELOG.md
180
167
  - Gemfile
181
168
  - LICENSE.txt
182
169
  - README.md
@@ -190,6 +177,7 @@ files:
190
177
  - lib/codeland/starter/integrations/heroku.rb
191
178
  - lib/codeland/starter/version.rb
192
179
  - spec/fixtures/heroku_app.json
180
+ - spec/fixtures/heroku_collaborator.json
193
181
  - spec/spec_helper.rb
194
182
  - spec/starter/configuration_spec.rb
195
183
  - spec/starter/integrations/heroku_spec.rb
@@ -232,12 +220,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
220
  version: '0'
233
221
  requirements: []
234
222
  rubyforge_project:
235
- rubygems_version: 2.4.5
223
+ rubygems_version: 2.4.5.1
236
224
  signing_key:
237
225
  specification_version: 4
238
226
  summary: To create Rails projects with template and integrations
239
227
  test_files:
240
228
  - spec/fixtures/heroku_app.json
229
+ - spec/fixtures/heroku_collaborator.json
241
230
  - spec/spec_helper.rb
242
231
  - spec/starter/configuration_spec.rb
243
232
  - spec/starter/integrations/heroku_spec.rb