slim-rails 3.0.0 → 3.0.1

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: d7d4bb7e7f7d8dfae0753066a36fbe7f7f4912e7
4
- data.tar.gz: 0bfd931060f0ec2525d74a3d1d4041b8f46874e8
3
+ metadata.gz: 319c67fbbeae663c591f1bf657897b2d1f9e77b0
4
+ data.tar.gz: 4b6e7026b445ed217ca544cb4e5c73d1249f2f89
5
5
  SHA512:
6
- metadata.gz: 64c1baabb5a565e19687ebfa3b89aad260f5c3e9dca0cfb91d72c089a235fe538ca2fb33311827cea25869459bc619df0c22b6a04394d15827f97c70556128c0
7
- data.tar.gz: b5656af0e8b62b5c19b4150721d41b841003312c7855b45d7f05563be671d4a4af299a2c868c78a611a1838cda4fc38984feccb396f129a15d26c3e042ad6cb6
6
+ metadata.gz: 71a3901d4848a6e15842f790c67485ef8811e9acb74b66d220cd4b9bf33618aef608bd659a7b9af3e1d25b8a0da141f6835e11c7b3a75ffca46d2a09c47a00a6
7
+ data.tar.gz: 99b27eb2a258fca8fba0fa978f95823aacaab687779d8349a0dbf9af96c0d81c83512a54948d981acf22e38941fafa0446f66d574e345655c690ced06da9303d
data/.gitignore CHANGED
@@ -14,4 +14,4 @@ rdoc
14
14
  spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
- tmp
17
+ tmp/
@@ -0,0 +1 @@
1
+ slim-rails
@@ -0,0 +1 @@
1
+ ruby-2.1
@@ -1,4 +1,5 @@
1
+ - 2.2
2
+ - 2.1
3
+ - 2.0.0
1
4
  - 1.9.3
2
5
  - 1.9.2
3
- - 1.9.1
4
- - 1.8.7
data/Gemfile CHANGED
@@ -1,7 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- # gem 'erubis'
6
- # gem 'haml'
7
- # gem 'hamlet'
@@ -12,7 +12,7 @@ module Slim
12
12
  end
13
13
  end
14
14
 
15
- hook_for :form_builder, :as => :scaffold
15
+ hook_for :form_builder, as: :scaffold
16
16
 
17
17
  protected
18
18
  def available_views
@@ -11,4 +11,4 @@
11
11
  = f.label :<%= attribute.name %>
12
12
  = f.<%= attribute.field_type %> :<%= attribute.name %>
13
13
  <% end -%>
14
- .actions = f.submit 'Save'
14
+ .actions = f.submit
@@ -1,14 +1,11 @@
1
+ require 'slim-rails/version'
1
2
  require 'rails'
2
3
  require 'slim'
3
4
 
4
5
  module Slim
5
6
  module Rails
6
7
  class Railtie < ::Rails::Railtie
7
- if ::Rails.version.to_s >= '3.1'
8
- config.app_generators.template_engine :slim
9
- else
10
- config.generators.template_engine :slim
11
- end
8
+ config.app_generators.template_engine :slim
12
9
 
13
10
  initializer 'slim_rails.configure_template_digestor' do |app|
14
11
  if app.assets && app.assets.respond_to?(:register_engine)
@@ -41,3 +38,6 @@ module Slim
41
38
  end
42
39
  end
43
40
  end
41
+
42
+ Slim::Engine.set_options pretty: Rails.env.development?
43
+
@@ -1,5 +1,5 @@
1
1
  module Slim
2
2
  module Rails
3
- VERSION = "3.0.0"
3
+ VERSION = "3.0.1"
4
4
  end
5
5
  end
@@ -23,10 +23,10 @@ Gem::Specification.new do |gem|
23
23
  gem.add_development_dependency 'guard', '~> 2.10'
24
24
  gem.add_development_dependency 'guard-minitest', '~> 2.3'
25
25
  gem.add_development_dependency 'guard-rocco', ['>= 0.0.3', '< 1.0.0']
26
- gem.add_runtime_dependency 'activesupport', ['>= 3.0', '< 4.2']
27
- gem.add_runtime_dependency 'actionpack', ['>= 3.0', '< 4.2']
28
- gem.add_runtime_dependency 'actionmailer', ['>= 3.0', '< 4.2']
29
- gem.add_runtime_dependency 'railties', ['>= 3.0', '< 4.2']
26
+ gem.add_runtime_dependency 'activesupport', ['>= 3.1', '< 5.0']
27
+ gem.add_runtime_dependency 'actionpack', ['>= 3.1', '< 5.0']
28
+ gem.add_runtime_dependency 'actionmailer', ['>= 3.1', '< 5.0']
29
+ gem.add_runtime_dependency 'railties', ['>= 3.1', '< 5.0']
30
30
  gem.add_runtime_dependency 'slim', '~> 3.0'
31
31
  end
32
32
 
@@ -7,8 +7,8 @@ TestApp.routes.draw do |map|
7
7
  # Keep in mind you can assign values other than :controller and :action
8
8
 
9
9
  # Sample of named route:
10
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
- # This route can be invoked with purchase_url(:id => product.id)
10
+ # match 'products/:id/purchase' => 'catalog#purchase', as: :purchase
11
+ # This route can be invoked with purchase_url(id: product.id)
12
12
 
13
13
  # Sample resource route (maps HTTP verbs to controller actions automatically):
14
14
  # resources :products
@@ -35,7 +35,7 @@ TestApp.routes.draw do |map|
35
35
  # resources :products do
36
36
  # resources :comments
37
37
  # resources :sales do
38
- # get :recent, :on => :collection
38
+ # get :recent, on: :collection
39
39
  # end
40
40
  # end
41
41
 
@@ -48,7 +48,7 @@ TestApp.routes.draw do |map|
48
48
 
49
49
  # You can have the root of your site routed with "root"
50
50
  # just remember to delete public/index.html.
51
- # root :to => "welcome#index"
51
+ # root to: "welcome#index"
52
52
 
53
53
  # See how all your routes lay out with "rake routes"
54
54
 
@@ -18,7 +18,7 @@ class Slim::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase
18
18
 
19
19
  test "should revoke template engine" do
20
20
  run_generator
21
- run_generator ["product_line", "--orm", "active-record"], :behavior => :revoke
21
+ run_generator ["product_line", "--orm", "active-record"], behavior: :revoke
22
22
 
23
23
  assert_no_file File.join "app", "views", "product_lines"
24
24
  assert_no_file File.join "app", "views", "layouts", "product_lines.html.slim"
@@ -1 +1 @@
1
- require_generators :slim => ['scaffold', 'controller', 'mailer']
1
+ require_generators slim: ['scaffold', 'controller', 'mailer']
@@ -34,8 +34,8 @@ end
34
34
 
35
35
  def generator_list
36
36
  {
37
- :rails => ['scaffold', 'controller', 'mailer'],
38
- :slim => ['scaffold', 'controller', 'mailer']
37
+ rails: ['scaffold', 'controller', 'mailer'],
38
+ slim: ['scaffold', 'controller', 'mailer']
39
39
  }
40
40
  end
41
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonardo Almeida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-16 00:00:00.000000000 Z
11
+ date: 2014-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -120,80 +120,80 @@ dependencies:
120
120
  requirements:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: '3.0'
123
+ version: '3.1'
124
124
  - - "<"
125
125
  - !ruby/object:Gem::Version
126
- version: '4.2'
126
+ version: '5.0'
127
127
  type: :runtime
128
128
  prerelease: false
129
129
  version_requirements: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - ">="
132
132
  - !ruby/object:Gem::Version
133
- version: '3.0'
133
+ version: '3.1'
134
134
  - - "<"
135
135
  - !ruby/object:Gem::Version
136
- version: '4.2'
136
+ version: '5.0'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: actionpack
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
- version: '3.0'
143
+ version: '3.1'
144
144
  - - "<"
145
145
  - !ruby/object:Gem::Version
146
- version: '4.2'
146
+ version: '5.0'
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
- version: '3.0'
153
+ version: '3.1'
154
154
  - - "<"
155
155
  - !ruby/object:Gem::Version
156
- version: '4.2'
156
+ version: '5.0'
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: actionmailer
159
159
  requirement: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - ">="
162
162
  - !ruby/object:Gem::Version
163
- version: '3.0'
163
+ version: '3.1'
164
164
  - - "<"
165
165
  - !ruby/object:Gem::Version
166
- version: '4.2'
166
+ version: '5.0'
167
167
  type: :runtime
168
168
  prerelease: false
169
169
  version_requirements: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: '3.0'
173
+ version: '3.1'
174
174
  - - "<"
175
175
  - !ruby/object:Gem::Version
176
- version: '4.2'
176
+ version: '5.0'
177
177
  - !ruby/object:Gem::Dependency
178
178
  name: railties
179
179
  requirement: !ruby/object:Gem::Requirement
180
180
  requirements:
181
181
  - - ">="
182
182
  - !ruby/object:Gem::Version
183
- version: '3.0'
183
+ version: '3.1'
184
184
  - - "<"
185
185
  - !ruby/object:Gem::Version
186
- version: '4.2'
186
+ version: '5.0'
187
187
  type: :runtime
188
188
  prerelease: false
189
189
  version_requirements: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
192
192
  - !ruby/object:Gem::Version
193
- version: '3.0'
193
+ version: '3.1'
194
194
  - - "<"
195
195
  - !ruby/object:Gem::Version
196
- version: '4.2'
196
+ version: '5.0'
197
197
  - !ruby/object:Gem::Dependency
198
198
  name: slim
199
199
  requirement: !ruby/object:Gem::Requirement
@@ -216,7 +216,8 @@ extensions: []
216
216
  extra_rdoc_files: []
217
217
  files:
218
218
  - ".gitignore"
219
- - ".rvmrc"
219
+ - ".ruby-gemset"
220
+ - ".ruby-version"
220
221
  - ".travis.yml"
221
222
  - Gemfile
222
223
  - Guardfile
@@ -242,8 +243,6 @@ files:
242
243
  - test/lib/generators/slim/scaffold_generator_test.rb
243
244
  - test/lib/generators/slim/testing_helper.rb
244
245
  - test/test_helper.rb
245
- - tmp/rails/config/routes.rb
246
- - tmp/rails/public/stylesheets/scaffold.css
247
246
  homepage: https://github.com/slim-template/slim-rails
248
247
  licenses:
249
248
  - MIT
data/.rvmrc DELETED
@@ -1,81 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # This is an RVM Project .rvmrc file, used to automatically load the ruby
4
- # development environment upon cd'ing into the directory
5
-
6
- # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
7
- environment_id="2.1.5@slim-rails"
8
-
9
- #
10
- # Uncomment the following lines if you want to verify rvm version per project
11
- #
12
- # rvmrc_rvm_version="1.10.2" # 1.10.1 seams as a safe start
13
- # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14
- # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15
- # return 1
16
- # }
17
- #
18
-
19
- #
20
- # Uncomment following line if you want options to be set only for given project.
21
- #
22
- # PROJECT_JRUBY_OPTS=( --1.9 )
23
- #
24
- # The variable PROJECT_JRUBY_OPTS requires the following to be run in shell:
25
- #
26
- # chmod +x ${rvm_path}/hooks/after_use_jruby_opts
27
- #
28
-
29
- #
30
- # First we attempt to load the desired environment directly from the environment
31
- # file. This is very fast and efficient compared to running through the entire
32
- # CLI and selector. If you want feedback on which environment was used then
33
- # insert the word 'use' after --create as this triggers verbose mode.
34
- #
35
- if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
36
- && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
37
- then
38
- \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
39
-
40
- if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]
41
- then
42
- . "${rvm_path:-$HOME/.rvm}/hooks/after_use"
43
- fi
44
- else
45
- # If the environment file has not yet been created, use the RVM CLI to select.
46
- if ! rvm --create "$environment_id"
47
- then
48
- echo "Failed to create RVM environment '${environment_id}'."
49
- return 1
50
- fi
51
- fi
52
-
53
- #
54
- # If you use an RVM gemset file to install a list of gems (*.gems), you can have
55
- # it be automatically loaded. Uncomment the following and adjust the filename if
56
- # necessary.
57
- #
58
- # filename=".gems"
59
- # if [[ -s "$filename" ]]
60
- # then
61
- # rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
62
- # fi
63
-
64
- # If you use bundler, this might be useful to you:
65
- # if [[ -s Gemfile ]] && ! command -v bundle >/dev/null
66
- # then
67
- # printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
68
- # gem install bundler
69
- # fi
70
- # if [[ -s Gemfile ]] && command -v bundle
71
- # then
72
- # bundle install
73
- # fi
74
-
75
- if [[ $- == *i* ]] # check for interactive shells
76
- then
77
- echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
78
- else
79
- echo "Using: $GEM_HOME" # don't use colors in interactive shells
80
- fi
81
-