active_leonardo 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/LICENSE +11 -17
- data/README.md +18 -11
- data/lib/generators/rails/leosca_controller/leosca_controller_generator.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f7d5656a544f17985067cd89b93bcff1e6aedd1
|
|
4
|
+
data.tar.gz: 7587521b43ae2392ca026701e4cabe2af38da86c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3c27b5fa5be2cc1ecd0d4c5a702406f3ad630ce20515eb840b346acfda881bf2eb716e77b9fcde42399833720588af3515a778503594d6ef145b39c4578c5dc
|
|
7
|
+
data.tar.gz: 34bd569bb0928371c765ef7d46eb744d168bfbe0b02ed9056fdbc2d133fbb76a92282225f9504d16c5f26bfaaa52d229bf49c9a3d8483de728ab0d13e81b5bda
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
0.5.1 [☰](https://github.com/marcomd/Active_Leonardo/compare/v0.5.0...v0.5.1) Jennuary 20th, 2015
|
|
2
|
+
------------------------------
|
|
3
|
+
* Tutorial updated
|
|
4
|
+
* Change in Ability model: the pre configured user profile now cannot destroy resource
|
|
5
|
+
* License updated
|
|
6
|
+
|
|
1
7
|
0.5.0 [☰](https://github.com/marcomd/Active_Leonardo/compare/v0.4.1...v0.5.0) Jennuary 7th, 2015
|
|
2
8
|
------------------------------
|
|
3
9
|
* Removed custom cancan integration, now activeadmin includes it
|
data/LICENSE
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2015 Marco Mastrodonato
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
-
the following conditions:
|
|
3
|
+
This program is free software: you can redistribute it and/or modify
|
|
4
|
+
it under the terms of the GNU General Public License as published by
|
|
5
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
6
|
+
(at your option) any later version.
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
This program is distributed in the hope that it will be useful,
|
|
9
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
GNU General Public License for more details.
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
13
|
+
You should have received a copy of the GNU General Public License
|
|
14
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
data/README.md
CHANGED
|
@@ -23,9 +23,16 @@ Click on Travis badge for more details.
|
|
|
23
23
|
|
|
24
24
|
or
|
|
25
25
|
|
|
26
|
-
rails new ActiveLeo -m
|
|
26
|
+
rails new ActiveLeo -m https://db.tt/gPe6A0l9
|
|
27
|
+
|
|
28
|
+
or
|
|
29
|
+
|
|
30
|
+
click [here](https://dl.dropboxusercontent.com/u/52600966/active_template.rb) to download the template.
|
|
31
|
+
|
|
32
|
+
or
|
|
33
|
+
|
|
34
|
+
You can also get it from the gem root folder
|
|
27
35
|
|
|
28
|
-
Click [here](http://dl.dropbox.com/u/52600966/active_template.rb) to download the template.
|
|
29
36
|
|
|
30
37
|
## Usage
|
|
31
38
|
|
|
@@ -44,9 +51,7 @@ You can run it more times and right like scaffold, it's smart and won't generate
|
|
|
44
51
|
|
|
45
52
|
1. Firstly, create layout and initialize your project:
|
|
46
53
|
|
|
47
|
-
rails new ActiveLeo -m
|
|
48
|
-
|
|
49
|
-
(You can also find the template into gem root folder)
|
|
54
|
+
rails new ActiveLeo -m YOUR_TEMPLATE_PATH (see above: install paragraph)
|
|
50
55
|
|
|
51
56
|
Answer y to all gems you need.
|
|
52
57
|
After the questions it will start generations.
|
|
@@ -76,11 +81,13 @@ You can run it more times and right like scaffold, it's smart and won't generate
|
|
|
76
81
|
|
|
77
82
|
You can login as three different profiles loaded with a previous db:seed:
|
|
78
83
|
|
|
79
|
-
1. admin@activeleo.com,
|
|
84
|
+
1. admin@activeleo.com, password: abcd1234 [this profile can do everything]
|
|
85
|
+
|
|
86
|
+
2. manager@activeleo.com, password: abcd1234 [can read, create, update and destroy]
|
|
80
87
|
|
|
81
|
-
|
|
88
|
+
3. user@activeleo.com, password: abcd1234 [can read, create and update]
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
There is a fourth profile for _guest_ users who can only see the data. In addition to these you can create all the profiles you need according to cancan rules.
|
|
84
91
|
|
|
85
92
|
|
|
86
93
|
3. Create your resource:
|
|
@@ -223,19 +230,19 @@ On my [Blog](http://mastrodonato.it/) you can find some other info.
|
|
|
223
230
|
|
|
224
231
|
## Found a bug?
|
|
225
232
|
|
|
226
|
-
|
|
233
|
+
Please open an issue on github or ask
|
|
227
234
|
* m.mastrodonato@gmail.com
|
|
228
235
|
* marcovlonghitano@gmail.com
|
|
229
236
|
|
|
230
237
|
|
|
231
238
|
## Rails 3.2.x
|
|
232
239
|
|
|
233
|
-
It works
|
|
240
|
+
It works
|
|
234
241
|
|
|
235
242
|
|
|
236
243
|
## Rails 3.1.x
|
|
237
244
|
|
|
238
|
-
|
|
245
|
+
It should work but has not been tested
|
|
239
246
|
|
|
240
247
|
|
|
241
248
|
## Rails 2 and Rails 3.0.x
|
|
@@ -70,7 +70,8 @@ module Rails
|
|
|
70
70
|
can :read, #{class_name} if #{options[:auth_class].downcase}.role? :guest
|
|
71
71
|
if #{options[:auth_class].downcase}.role? :user
|
|
72
72
|
can [:read, :create], #{class_name}
|
|
73
|
-
can [:update
|
|
73
|
+
can [:update], #{class_name}
|
|
74
|
+
#can [:destroy], #{class_name}
|
|
74
75
|
end
|
|
75
76
|
if #{options[:auth_class].downcase}.role? :manager
|
|
76
77
|
can [:read, :create, :update, :destroy], #{class_name}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_leonardo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marco Mastrodonato
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-01-
|
|
12
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|