onotole 1.1.3 → 1.1.4

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: c5ea838d334c7fd268cb2c0b1b3eb9b3e7ef83e8
4
- data.tar.gz: f71a350cfcd7c2e5bebec9e29a5e3d141155e033
3
+ metadata.gz: 69becb51cf5563e771e496aa5743128bd51a30a8
4
+ data.tar.gz: cf533690ac9787e013fb0fc115ad1f99e1bc3eba
5
5
  SHA512:
6
- metadata.gz: 27f6cf1c85669532a15b33d18dd390eb66293b744d287b0c4590f29160a36a94e8f5e39331fed9d1b2873119c837edc3bc02fe342a3f424010aa79c03cbc5d3c
7
- data.tar.gz: 07abb0223318ac2e99a68fa92f85d8b7e78704724f15002742cfa109c686cdfe3d509352ec133751796bfafb65d8e51b22aca09ed5c8d268d5be75588fe7f532
6
+ metadata.gz: 3b49e4638c9070060dfd32e063f8d295e100efd8c35e90143cebf120b2712bf77b00e7f1e987f268c72dd3bb43235567a37007f40d8401515d30c5cb761e4cc9
7
+ data.tar.gz: 4f1e0396723e421bb9994da228e6e5454afaebdb2e45cc9abeb2159f652af5059b133cfd1a39905ecdfea2f346fe95060edbad367155552ddb12cba427756036
data/README.md CHANGED
@@ -26,6 +26,7 @@ will be installed as addition like default, if start `onotole` with out `-c`
26
26
  flag. You can provide automatic install with options, like `--haml`. Default
27
27
  pack will not be installed with any gem option.
28
28
 
29
+ ### Flexible gem group
29
30
 
30
31
  * [Airbrake](https://github.com/airbrake/airbrake) For exception notification
31
32
  * [bootstrap3](https://github.com/seyhunak/twitter-bootstrap-rails) Bootstrap
@@ -129,16 +130,18 @@ or
129
130
 
130
131
  gem install onotole
131
132
 
132
- Create gemset if you need it.
133
-
134
133
  Then run:
135
134
 
136
135
  onotole projectname [ -c ] [ * rails_genetator_flags ]
137
136
 
137
+ There is 2 main ways of using:
138
+ 1. `onotole projectname` will generate project with default mandatory gems and
139
+ default flexible gems
140
+ 2. `onotole projectname -c` will generate project with mandatory gems and will
141
+ provide a menu for gem selection, where you will need to choose all options.
138
142
 
139
- This will create a Rails app in `projectname` using the latest version of Rails.
140
-
141
- onotole projectname -c
143
+ Of course you are free to add standard `rails new` flags, inasmuch as Onotole
144
+ based on standard rails generator
142
145
 
143
146
  And command like this will add some magic
144
147
 
@@ -149,10 +152,6 @@ it with gemname flag, after app_name, like `onotole projectname --slim`.
149
152
  List of gems you always can get with `onotole --gems` command. Also,
150
153
  `onotole --help` can be useful.
151
154
 
152
- !!! Note, that databases with names `projectname`_development and `projectname`_test
153
- will be dropped. For example, if your project calls `awesome`, databases
154
- `awesome_development` and `awesome_test` will be dropped.
155
-
156
155
  *NB: if you install custom gems, default user gem pack will not be installed.
157
156
 
158
157
  ## Gemfile
@@ -161,7 +160,7 @@ To see the latest and greatest gems, look at Onotole'
161
160
  [Gemfile](templates/Gemfile.erb), which will be appended to the default
162
161
  generated projectname/Gemfile. This gem will be installed anyway.
163
162
 
164
- It includes application gems like:
163
+ ### Mandatory gem group
165
164
 
166
165
  * [Autoprefixer Rails](https://github.com/ai/autoprefixer-rails) for CSS vendor prefixes
167
166
  * [Delayed Job](https://github.com/collectiveidea/delayed_job) for background
@@ -250,7 +249,9 @@ Onotole also comes with:
250
249
  * Added style flash messagaes for `bootstrap-sass` gem
251
250
  * Auto add gem `devise_bootstrap_views` when `bootstrap-sass` and `devise`
252
251
  selected for pretty view from the box
253
- * Added autoload js and scss from `vendor/assets/javascripts` and `vendor/assets/stylesheets`
252
+ * Added autoload js and scss from `vendor/assets/javascripts` and
253
+ `vendor/assets/stylesheets`
254
+ * Added autoload fonts from `app/assets/fonts/**/*`
254
255
 
255
256
  ## Heroku
256
257
 
@@ -262,8 +263,7 @@ This:
262
263
 
263
264
  * Creates a staging and production Heroku app
264
265
  * Sets them as `staging` and `production` Git remotes
265
- * Configures staging with `RACK_ENV` and `RAILS_ENV` environment variables set
266
- to `staging`
266
+ * Configures staging with `RACK_ENV` environment variable set to `staging`
267
267
  * Adds the [Rails Stdout Logging][logging-gem] gem
268
268
  to configure the app to log to standard out,
269
269
  which is how [Heroku's logging][heroku-logging] works.
@@ -26,7 +26,7 @@ module Onotole
26
26
  end
27
27
 
28
28
  def create_staging_heroku_app(flags)
29
- rack_env = 'RACK_ENV=staging RAILS_ENV=staging'
29
+ rack_env = 'RACK_ENV=staging'
30
30
  app_name = heroku_app_name_for('staging')
31
31
 
32
32
  run_toolbelt_command "create #{app_name} #{flags}", 'staging'
@@ -52,7 +52,7 @@ module Onotole
52
52
  run 'touch .rubocop_todo.yml'
53
53
  t = <<-TEXT
54
54
 
55
- if ENV['RAILS_ENV'] == 'test' || ENV['RAILS_ENV'] == 'development'
55
+ if ENV['RACK_ENV'] == 'test' || ENV['RACK_ENV'] == 'development'
56
56
  require 'rubocop/rake_task'
57
57
  RuboCop::RakeTask.new
58
58
  end
@@ -222,6 +222,7 @@ end
222
222
  return unless user_choose? :fotoramajs
223
223
  inject_into_file(AppBuilder.js_file, "\n//= require fotorama",
224
224
  after: '//= require jquery_ujs')
225
+ append_file(AppBuilder.app_file_scss, "\n@import 'fotorama'")
225
226
  end
226
227
  end
227
228
  end
@@ -19,7 +19,7 @@ module Onotole
19
19
  def add_dotenv_heroku_gem
20
20
  inject_into_file('Gemfile', "\n gem 'dotenv-heroku'",
21
21
  after: 'group :development do')
22
- append_file 'Rakefile', %(\nrequire 'dotenv-heroku/tasks' if ENV['RAILS_ENV'] == 'test' || ENV['RAILS_ENV'] == 'development'\n)
22
+ append_file 'Rakefile', %(\nrequire 'dotenv-heroku/tasks' if ENV['RACK_ENV'] == 'test' || ENV['RACK_ENV'] == 'development'\n)
23
23
  end
24
24
 
25
25
  def add_slim_gem
@@ -80,5 +80,10 @@ module Onotole
80
80
  vendor_css_path = "\nRails.application.config.assets.paths += Dir[(Rails.root.join('vendor/assets/stylesheets'))]"
81
81
  append_file 'config/initializers/assets.rb', vendor_css_path
82
82
  end
83
+
84
+ def add_fonts_autoload
85
+ fonts = "\nRails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf|otf)\z/"
86
+ append_file 'config/initializers/assets.rb', fonts
87
+ end
83
88
  end
84
89
  end
@@ -177,6 +177,7 @@ module Onotole
177
177
  build :set_up_forego
178
178
  build :apply_vendorjs_folder
179
179
  build :add_vendor_css_path
180
+ build :add_fonts_autoload
180
181
  end
181
182
 
182
183
  # def setup_stylesheets
@@ -30,7 +30,7 @@ module Onotole
30
30
  def set_test_delivery_method
31
31
  inject_into_file(
32
32
  'config/environments/development.rb',
33
- "\n config.action_mailer.delivery_method = :test",
33
+ "\n config.action_mailer.delivery_method = :file",
34
34
  after: 'config.action_mailer.raise_delivery_errors = true'
35
35
  )
36
36
  end
@@ -28,7 +28,7 @@ end
28
28
  remove_file 'spec/rails_helper.rb'
29
29
  remove_file 'spec/spec_helper.rb'
30
30
  copy_file 'rails_helper.rb', 'spec/rails_helper.rb'
31
- copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
31
+ template 'spec_helper.rb.erb', 'spec/spec_helper.rb'
32
32
  end
33
33
 
34
34
  def configure_generators
@@ -2,5 +2,5 @@
2
2
  module Onotole
3
3
  RAILS_VERSION = '~> 4.2.0'
4
4
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
5
- VERSION = '1.1.3'
5
+ VERSION = '1.1.4'
6
6
  end
@@ -114,7 +114,7 @@ RSpec.describe 'Suspend a new project with default configuration' do
114
114
 
115
115
  it 'configs :test email delivery method for development' do
116
116
  expect(dev_env_file)
117
- .to match(/^ +config.action_mailer.delivery_method = :test$/)
117
+ .to match(/^ +config.action_mailer.delivery_method = :file$/)
118
118
  end
119
119
 
120
120
  it 'uses APPLICATION_HOST, not HOST in the production config' do
@@ -11,9 +11,6 @@
11
11
  "RACK_ENV":{
12
12
  "required":true
13
13
  },
14
- "RAILS_ENV":{
15
- "required":true
16
- },
17
14
  "<%= "#{app_name.upcase}_SECRET_KEY_BASE" %>":{
18
15
  "generator":"secret"
19
16
  },
@@ -1,4 +1,3 @@
1
1
  Last 2 versions
2
- Explorer >= 10
3
- iOS >= 7.1
2
+ Explorer >= 11
4
3
  Android >= 4.4
@@ -3,4 +3,4 @@ database:
3
3
  - bin/setup
4
4
  test:
5
5
  override:
6
- - bin/rake
6
+ - COVERAGE=true bin/rake
@@ -12,3 +12,4 @@ EXECJS_RUNTIME=Node
12
12
  <%= "#{app_name.upcase}_WEB_CONCURRENCY=1" %>
13
13
  <%= "#{app_name.upcase}_MAX_THREADS=16" %>
14
14
  <%= "#{app_name.upcase}_RAILS_SERVE_STATIC_FILES=true" %>
15
+ <%= "#{app_name.upcase}_COVERAGE=false" %>
@@ -2,7 +2,6 @@ development: &default
2
2
  adapter: postgresql
3
3
  database: <%= app_name %>_development
4
4
  encoding: utf8
5
- host: localhost
6
5
  min_messages: warning
7
6
  pool: <%%= Integer(ENV.fetch("DB_POOL", 5)) %>
8
7
  reaping_frequency: <%%= Integer(ENV.fetch("DB_REAPING_FREQUENCY", 10)) %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- ENV['RAILS_ENV'] = 'test'
2
+ ENV['RACK_ENV'] = 'test'
3
3
 
4
4
  require File.expand_path('../../config/environment', __FILE__)
5
5
  abort('DATABASE_URL environment variable is set') if ENV['DATABASE_URL']
@@ -1,7 +1,13 @@
1
1
  # frozen_string_literal: true
2
- if ENV.fetch('COVERAGE', false)
2
+ if ENV.fetch("#{app_name.upcase}_COVERAGE", false)
3
3
  require 'simplecov'
4
- SimpleCov.start 'rails'
4
+
5
+ if ENV["CIRCLE_ARTIFACTS"]
6
+ dir = File.join(ENV["CIRCLE_ARTIFACTS"], "coverage")
7
+ SimpleCov.coverage_dir(dir)
8
+ end
9
+
10
+ SimpleCov.start('rails')
5
11
  end
6
12
 
7
13
  require 'webmock/rspec'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onotole
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kvokka
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-17 00:00:00.000000000 Z
12
+ date: 2016-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -162,7 +162,7 @@ files:
162
162
  - templates/secrets.yml
163
163
  - templates/shoulda_matchers_config_rspec.rb
164
164
  - templates/smtp.rb.erb
165
- - templates/spec_helper.rb
165
+ - templates/spec_helper.rb.erb
166
166
  - templates/staging.rb
167
167
  - templates/tinymce.yml
168
168
  homepage: http://github.com/kvokka/onotole