active_leonardo 0.4.1 → 0.5.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: 46fe1db72e27ba0a666f6a5fd477f78e47abfe19
4
- data.tar.gz: 3a260b54254f4187ade5c37fae23e18e62d1b261
3
+ metadata.gz: f29db1342215bb12f27b052c47454c7832ef8862
4
+ data.tar.gz: b58bdb47a2214885c12216a0bf081c5a19164922
5
5
  SHA512:
6
- metadata.gz: d9450300646654cf2a2afcd8705857d12630dd9d1ab140d6a07f307367bfc991779c784305c63d55cc4121a95b2636ce01d4ad7e5bf063be46d2b1d362e0416e
7
- data.tar.gz: 7c4db87e476226e9926e6c39d90567aef13ff8fcbe4623c368a73c414d18d2b3f44b401aecc6798215232f6aaa684766acd4781c9df0b59eb59cdd105f83610f
6
+ metadata.gz: 82bdb0622ac22733d68291049d57c840a1bc656f12707be801dda9a7bc4b6322c68dfaf5cf389a7356bdbf494b272235d98e20d06895a2eb88ac725fb1450a5d
7
+ data.tar.gz: 8f979f182d69f0dc0f6639e83a34b2e71d4242b8de21d75cb1541fe929c6d7e9da6f7ed7ffb03217715ba93814270b99a9b9916871272c50a150953f030167ef
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ 0.5.0 [☰](https://github.com/marcomd/Active_Leonardo/compare/v0.4.1...v0.5.0) Jennuary 7th, 2015
2
+ ------------------------------
3
+ * Removed custom cancan integration, now activeadmin includes it
4
+ * Improved the template for rails 4.2
5
+ * removed the dependency with active admin which version 1 remains in beta
6
+ * Improved Readme and test.rake
7
+
1
8
  0.4.1 [☰](https://github.com/marcomd/Active_Leonardo/compare/v0.4.0...v0.4.1) July 22th, 2014
2
9
  ------------------------------
3
10
  * Added formtastic github url
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Leolay Generators
2
2
 
3
- [![Version ](http://img.shields.io/gem/v/active_leonardo.svg) ](https://rubygems.org/gems/active_leonardo)
3
+ [![Version ](https://badge.fury.io/rb/active_leonardo.svg) ](https://rubygems.org/gems/active_leonardo)
4
4
  [![Travis CI ](http://img.shields.io/travis/marcomd/Active_Leonardo/master.svg) ](https://travis-ci.org/marcomd/Active_Leonardo)
5
5
  [![Quality ](http://img.shields.io/codeclimate/github/marcomd/Active_Leonardo.svg)](https://codeclimate.com/github/marcomd/Active_Leonardo)
6
6
 
@@ -11,18 +11,10 @@ It generates the layout, the style, the internationalization and it helps you to
11
11
 
12
12
  This version has been tested on:
13
13
 
14
- * Rails `3.2.x` and Ruby `1.9.3` on Windows OS
15
- * Rails `3.2.x` and Ruby `2.0.x` on Windows OS
16
- * Rails `4.0.x` and Ruby `1.9.x` on Windows OS
17
- * Rails `4.0.x` and Ruby `2.0.x` on Windows OS
18
- * Rails `3.2.x` and Ruby `1.9.3` on Linux
19
- * Rails `3.2.x` and Ruby `2.0.x` on Linux
20
- * Rails `3.2.x` and Ruby `2.1.x` on Linux
21
- * Rails `4.0.x` and Ruby `1.9.3` on Linux
22
- * Rails `4.0.x` and Ruby `2.0.x` on Linux
23
- * Rails `4.0.x` and Ruby `2.1.x` on Linux
14
+ * Rails `3.2` `4.0` `4.1` `4.2` and Ruby `1.9.3` `2.0.0` `2.1.5` on Windows OS
15
+ * Rails `3.2` `4.0` `4.1` `4.1` and Ruby `1.9.3` `2.0.0` `2.1.5` on Linux OS
24
16
 
25
- We are pleased to have achieved this result :smile:
17
+ Click on Travis badge for more details.
26
18
 
27
19
 
28
20
  ## Install
@@ -163,49 +155,65 @@ Currently the only one available is provided by ActiveAdmin
163
155
  * active [default]
164
156
 
165
157
 
166
- ## How to perform tests
158
+ ## How to test this project locally
159
+
160
+ Download this project and go inside the folder
161
+
162
+ Install the bundle wherever you want:
163
+
164
+ ```ruby
165
+ bundle install --path=mybundle
166
+ ```
167
167
 
168
168
  Check current tasks typing:
169
169
 
170
170
  ```ruby
171
- bundle exec rake -T
171
+ rake -T
172
172
  ```
173
173
 
174
- rake active:tests:all[inspection] # Tests all rails versions
175
- rake active:tests:newapp[inspection,rails] # Creates a test rails app for ...
176
- rake active:tests:prepare[rails,path] # Prepare the environment passi...
174
+ rake active:tests:all[inspection,rails_versions] # Tests all rails versions
175
+ rake active:tests:newapp[inspection,rails] # Creates a test rails ap...
176
+ rake active:tests:prepare[rails,path] # Prepare the environment...
177
+
178
+ If you want to test everything we planned
177
179
 
178
- if you want to test all, you can entrust to our package:
179
180
  ```ruby
180
- bundle exec rake active:tests:all[inspection]
181
+ rake active:tests:all[inspection]
181
182
  ```
182
183
 
183
184
  if you pass the argument inspection you can check the application under the test folder:
184
185
 
185
186
  test/TestApp_xxx_32
186
187
  test/TestApp_xxx_40
188
+ test/TestApp_xxx_41
189
+ test/TestApp_xxx_42
187
190
 
188
191
  where xxx is the current ruby version and the last number the rails version.
192
+ Remember everytime you run a test that folders will be deleted and recreated.
189
193
 
190
- Every rails version has its own bundle under mybundle_xx folder.
194
+ Every rails version has its own bundle under ActiveLeonardo\mybundle_xx folder.
191
195
 
192
- If you want to perform a custom test, firstly make sure Gemfile.lock is not present otherwise delete it
193
- then you can type:
196
+ If you want to specify the rails version type:
194
197
 
195
198
  ```ruby
196
- bundle exec active:tests:prepare['3.2','mybundle_path']
199
+ rake active:tests:all[inspection,4.2]
197
200
  ```
198
201
 
199
- _It sets the variable ENV[RAILS_CI] and prepares the package in the specified path_
202
+ or multiple versions
200
203
 
201
204
  ```ruby
202
- bundle exec rake active:tests:newapp[inspection]
205
+ rake active:tests:all[inspection,4.1-4.2]
203
206
  ```
204
207
 
205
- the rails version has already been set by "active:tests:prepare" task.
208
+ you may also specify your rails as ENV variables, for example on windows:
206
209
 
210
+ ```ruby
211
+ set CI_RAILS=4.2
212
+ bundle install --path=mybundle_42
213
+ rake active:tests:newapp[inspection,4.2]
214
+ ```
207
215
 
208
- If you execute tests with the inspection parameter remember to delete app folder under test/ before perform a new execution.
216
+ Do **NOT** exec rake tests from bundle to avoid its bubble.
209
217
 
210
218
 
211
219
  ## Tutorial
@@ -219,9 +227,16 @@ If you are having a problem please submit an issue at
219
227
  * m.mastrodonato@gmail.com
220
228
  * marcovlonghitano@gmail.com
221
229
 
230
+
222
231
  ## Rails 3.2.x
223
232
 
224
- Use previous 0.1.0 version (tested with activeadmin 0.5.x)
233
+ It works on my system but if you have any troubles you may try 0.1.0 version (tested with activeadmin 0.5.x)
234
+
235
+
236
+ ## Rails 3.1.x
237
+
238
+ Why you should do that?
239
+
225
240
 
226
241
  ## Rails 2 and Rails 3.0.x
227
242
 
data/active_template.rb CHANGED
@@ -50,7 +50,7 @@ if use_git
50
50
  end
51
51
 
52
52
 
53
- gem "activeadmin", git: 'http://github.com/gregbell/active_admin.git'
53
+ gem "activeadmin", git: 'https://github.com/gregbell/active_admin.git'
54
54
  if test_mode
55
55
  gem "active_leonardo", path: "../../."
56
56
  else
@@ -109,11 +109,13 @@ end
109
109
 
110
110
  gem 'state_machine' if test_mode || yes?("Do you have to handle states ?")
111
111
 
112
- # Updates for Rails 4.1
113
- if /4.1.*/ === rails_version
114
- gem 'ransack', git: 'http://github.com/activerecord-hackery/ransack.git', branch: 'rails-4.1'
115
- gem 'polyamorous', git: 'http://github.com/activerecord-hackery/polyamorous.git'
116
- gem 'formtastic', git: 'http://github.com/justinfrench/formtastic.git'
112
+ # Updates for latest Rails versions
113
+ if /4.1/ === rails_version
114
+ # gem 'ransack', git: 'http://github.com/activerecord-hackery/ransack.git', branch: 'rails-4.1'
115
+ # gem 'polyamorous', git: 'http://github.com/activerecord-hackery/polyamorous.git'
116
+ # gem 'formtastic', git: 'http://github.com/justinfrench/formtastic.git'
117
+ elsif /4.2/ === rails_version
118
+ gem 'inherited_resources', git: 'https://github.com/josevalim/inherited_resources.git', branch: 'rails-4-2'
117
119
  end
118
120
 
119
121
  dashboard_root = test_mode || yes?("Would you use dashboard as root ? (recommended)")
@@ -11,65 +11,6 @@ module ActiveAdmin
11
11
  para style_image_tag "logo.png"
12
12
  end
13
13
  end
14
-
15
- end
16
- end
17
-
18
- #Per integrare default_actions con cancan
19
- #\lib\active_admin\views\index_as_table.rb
20
- class IndexAsTable
21
- class IndexTableFor
22
- # Adds links to View, Edit and Delete
23
- def default_actions(options = {})
24
- options = {
25
- :name => "",
26
- :auth => true
27
- }.merge(options)
28
- column options[:name] do |resource|
29
- links = ''.html_safe
30
- if controller.action_methods.include?('show') && (options[:auth] ? can?(:read, resource) : true)
31
- links += link_to I18n.t('active_admin.view'), resource_path(resource), :class => "member_link view_link"
32
- end
33
- if controller.action_methods.include?('edit') && (options[:auth] ? can?(:update, resource) : true)
34
- links += link_to I18n.t('active_admin.edit'), edit_resource_path(resource), :class => "member_link edit_link"
35
- end
36
- if controller.action_methods.include?('destroy') && (options[:auth] ? can?(:destroy, resource) : true)
37
- links += link_to I18n.t('active_admin.delete'), resource_path(resource), :method => :delete, :confirm => I18n.t('active_admin.delete_confirmation'), :class => "member_link delete_link"
38
- end
39
- links
40
- end
41
- end
42
- end
43
- end
44
- end
45
- class Resource
46
- module ActionItems
47
- private
48
-
49
- # Adds the default action items to each resource
50
- def add_default_action_items
51
- # New Link on all actions except :new and :show
52
- add_action_item :except => [:new, :show] do
53
- if controller.action_methods.include?('new') && can?(:create, active_admin_config.resource_class)
54
- link_to(I18n.t('active_admin.new_model', :model => active_admin_config.resource_name), new_resource_path)
55
- end
56
- end
57
-
58
- # Edit link on show
59
- add_action_item :only => :show do
60
- if controller.action_methods.include?('edit') && can?(:edit, resource)
61
- link_to(I18n.t('active_admin.edit_model', :model => active_admin_config.resource_name), edit_resource_path(resource))
62
- end
63
- end
64
-
65
- # Destroy link on show
66
- add_action_item :only => :show do
67
- if controller.action_methods.include?("destroy") && can?(:destroy, resource)
68
- link_to(I18n.t('active_admin.delete_model', :model => active_admin_config.resource_name),
69
- resource_path(resource),
70
- :method => :delete, :confirm => I18n.t('active_admin.delete_confirmation'))
71
- end
72
- end
73
14
  end
74
15
  end
75
16
  end
metadata CHANGED
@@ -1,54 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_leonardo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
- - Marco Mastrodonato, Marco Longhitano
7
+ - Marco Mastrodonato
8
+ - Marco Longhitano
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-07-22 00:00:00.000000000 Z
12
+ date: 2015-01-07 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rails
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - '>='
18
+ - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 3.2.0
20
+ version: '3.2'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - '>='
25
+ - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 3.2.0
27
- - !ruby/object:Gem::Dependency
28
- name: activeadmin
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: 0.6.3
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: 0.6.3
27
+ version: '3.2'
41
28
  description: This generator help you to create new Rails applications to combine with
42
29
  active admin gem. It generates application structure to easily get the internationalization
43
30
  and authorization.
44
31
  email:
45
- - m.mastrodonato@gmail.com, marcovlonghitano@gmail.com
32
+ - m.mastrodonato@gmail.com
33
+ - marcovlonghitano@gmail.com
46
34
  executables: []
47
35
  extensions: []
48
36
  extra_rdoc_files: []
49
37
  files:
38
+ - CHANGELOG.md
39
+ - LICENSE
40
+ - README.md
41
+ - active_template.rb
50
42
  - lib/generators/active_leonardo.rb
51
43
  - lib/generators/erb/leosca/leosca_generator.rb
44
+ - lib/generators/leolay/USAGE
52
45
  - lib/generators/leolay/install_generator.rb
53
46
  - lib/generators/leolay/leolay_generator.rb
54
47
  - lib/generators/leolay/templates/app/admin/users.rb
@@ -69,21 +62,20 @@ files:
69
62
  - lib/generators/leolay/templates/styles/active/images/ico_v.png
70
63
  - lib/generators/leolay/templates/styles/active/images/ico_x.png
71
64
  - lib/generators/leolay/templates/styles/active/images/logo.png
65
+ - lib/generators/leolay/templates/styles/active/stylesheets/app/_enviroment.css.scss
72
66
  - lib/generators/leolay/templates/styles/active/stylesheets/app/custom_active_admin.css.scss
73
67
  - lib/generators/leolay/templates/styles/active/stylesheets/app/stylesheet.css.scss
74
- - lib/generators/leolay/templates/styles/active/stylesheets/app/_enviroment.css.scss
75
- - lib/generators/leolay/templates/styles/active/views/layout/application.html.erb
76
68
  - lib/generators/leolay/templates/styles/active/views/layout/_message.html.erb
77
69
  - lib/generators/leolay/templates/styles/active/views/layout/_session.html.erb
78
- - lib/generators/leolay/USAGE
79
- - lib/generators/leosca/install_generator.rb
70
+ - lib/generators/leolay/templates/styles/active/views/layout/application.html.erb
80
71
  - lib/generators/leosca/USAGE
72
+ - lib/generators/leosca/install_generator.rb
73
+ - lib/generators/rails/leosca/USAGE
81
74
  - lib/generators/rails/leosca/leosca_generator.rb
82
75
  - lib/generators/rails/leosca/templates/leosca.css
83
- - lib/generators/rails/leosca/USAGE
76
+ - lib/generators/rails/leosca_controller/USAGE
84
77
  - lib/generators/rails/leosca_controller/leosca_controller_generator.rb
85
78
  - lib/generators/rails/leosca_controller/templates/controller.rb
86
- - lib/generators/rails/leosca_controller/USAGE
87
79
  - lib/generators/rspec/leointegration/leointegration_generator.rb
88
80
  - lib/generators/rspec/leointegration/templates/admin/feature.rb
89
81
  - lib/generators/rspec/leointegration/templates/feature.rb
@@ -100,12 +92,9 @@ files:
100
92
  - lib/generators/rspec/leosca/templates/new_spec.rb
101
93
  - lib/generators/rspec/leosca/templates/routing_spec.rb
102
94
  - lib/generators/rspec/leosca/templates/show_spec.rb
103
- - LICENSE
104
- - README.md
105
- - CHANGELOG.md
106
- - active_template.rb
107
95
  homepage: https://github.com/marcomd/Active_Leonardo
108
- licenses: []
96
+ licenses:
97
+ - GPL-3.0
109
98
  metadata: {}
110
99
  post_install_message:
111
100
  rdoc_options: []
@@ -113,18 +102,18 @@ require_paths:
113
102
  - lib
114
103
  required_ruby_version: !ruby/object:Gem::Requirement
115
104
  requirements:
116
- - - '>='
105
+ - - ">="
117
106
  - !ruby/object:Gem::Version
118
107
  version: '0'
119
108
  required_rubygems_version: !ruby/object:Gem::Requirement
120
109
  requirements:
121
- - - '>='
110
+ - - ">="
122
111
  - !ruby/object:Gem::Version
123
112
  version: '0'
124
113
  requirements:
125
114
  - Start a new app with the active_template.rb inside root folder
126
115
  rubyforge_project:
127
- rubygems_version: 2.0.14
116
+ rubygems_version: 2.2.3
128
117
  signing_key:
129
118
  specification_version: 4
130
119
  summary: This gem provides a new customized scaffold generator to combine with active