arpa 0.0.2 → 0.0.3

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: 8b1918d1807d5e006ce34bcb7eae4c495a605930
4
- data.tar.gz: 0e9320f97b278352163636d3b562aec0f81b1b3f
3
+ metadata.gz: 8e57f3dc5e68514780add5b470969b9e0b9aae4c
4
+ data.tar.gz: e9b27144accd8a4674d3f54b11edb150d25234dd
5
5
  SHA512:
6
- metadata.gz: 93f5bd0a9df3c2c088c95dd337cf5c106d240149a138ab0373d44752f46988847286dff718a1f12b15c9093f39524ec7e9f325d268a9040fb46101e5320d13d9
7
- data.tar.gz: c213426b20ee6c4b164a6be60a06f6af6656642c8363ccd6b3a07e3400781a4f86c0653ff9558ed9295f7c0e9970900c16aacb86bf945d13eab6a61abcfa58c4
6
+ metadata.gz: f23c79a7c2d75f4ef9079a7f95dddfbcd110616cd402fa2a942b962d50218ebaa84e117a106577ce3f5cd3f6ed84b7a91ca39d6d39e7932749e2aba5f9564883
7
+ data.tar.gz: e55e79c4a83003e099f62bc7f01abc0e56afe64cb0cfcef6044ca9eacc7a316e8b63389a748deb27c450ad692886f97659125cc62a6937015725c1b30ddf1d0d
data/README.md CHANGED
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install arpa
20
20
 
21
- After you install Ar and add it to your Gemfile, you need to run the generator:
21
+ After you install Arpa and add it to your Gemfile, you need to run the generator:
22
22
 
23
23
  $ rails generate arpa:install
24
24
 
@@ -26,14 +26,14 @@ This command will create some files that are needed to run the Gem.
26
26
 
27
27
  | File | Purpose |
28
28
  |----------|:-------------:|
29
- | db/migrate/20140120201010_create_arpa_tables.rb | Migration to create the all **Ar** tables in your database (your name will include a different timestamp) |
30
- | config/locales/arpa.en.yml | Locales to use in Ar classes |
31
- | app/assets/stylesheets/arpa/arpa_accordion.scss | Basic stylesheet to use with Ar views |
29
+ | db/migrate/20140120201010_create_arpa_tables.rb | Migration to create the all **Arpa** tables in your database (your name will include a different timestamp) |
30
+ | config/locales/arpa.en.yml | Locales to use in Arpa classes |
31
+ | app/assets/stylesheets/arpa/arpa_accordion.scss | Basic stylesheet to use with Arpa views |
32
32
  | app/controllers/arpa/resources_controller.rb app/controllers/arpa/roles_controller.rb app/controllers/arpa/profiles_controller.rb | Controllers to use the CRUD actions for each one |
33
33
  | app/views/arpa/resources/ app/controllers/arpa/roles/ app/controllers/arpa/profiles/ | All views to use the CRUD actions for each controller above |
34
- | config/routes.rb | Will add all routes into this file with all resources of Ar |
34
+ | config/routes.rb | Will add all routes into this file with all resources of Arpa |
35
35
 
36
- After generate, you need to run the migration to create all Ar tables:
36
+ After generate, you need to run the migration to create all Arpa tables:
37
37
 
38
38
  $ rake db:migrate
39
39
 
@@ -41,7 +41,7 @@ After generate, you need to run the migration to create all Ar tables:
41
41
 
42
42
  ## Usage
43
43
 
44
- First of all you must create the Resources, Roles and Profiles (each is avaliable in the paths listed above). After that you need associate **Profiles** with **User** (to do this, you need create by your own the associate form view, saving some profiles in some user). Done that you can use some Helpers generated by Ar.
44
+ First of all you must create the Resources, Roles and Profiles (each is avaliable in the paths listed above). After that you need associate **Profiles** with **User** (to do this, you need create by your own the associate form view, saving some profiles in some user). Done that you can use some Helpers generated by Arpa.
45
45
 
46
46
  ### Association between Profiles and Users
47
47
 
@@ -51,14 +51,14 @@ You just add a HBTM association in User model:
51
51
 
52
52
  ```ruby
53
53
  class User < ActiveRecord::Base
54
- has_and_belongs_to_many :profiles, class_name: 'Ar::Repositories::Profiles::RepositoryProfile'
54
+ has_and_belongs_to_many :profiles, class_name: 'Arpa::Repositories::Profiles::RepositoryProfile'
55
55
  end
56
56
  ```
57
57
  With this you will be able to use the :profile_ids method.
58
58
 
59
59
  ### Controller helpers
60
60
 
61
- Ar will create some helpers to use inside your controllers and views.
61
+ Arpa will create some helpers to use inside your controllers and views.
62
62
 
63
63
  To verify if a user has access to some :controler and :action, use the following helper:
64
64
 
@@ -68,12 +68,12 @@ has_access?('users', 'index')
68
68
  **Obs.:** To that helper method works. You must have **:session** (In Rails app already has) and **:current_user** attribute or method.
69
69
 
70
70
  ---
71
- If you want use that method inside another object you should use the **Ar::Services::Verifier** class;
71
+ If you want use that method inside another object you should use the **Arpa::Services::Verifier** class;
72
72
 
73
73
  You just need pass as arguments the :session and :current_user:
74
74
 
75
75
  ```ruby
76
- verifier = Ar::Services::Verifier.new(session, current_user)
76
+ verifier = Arpa::Services::Verifier.new(session, current_user)
77
77
  verifier.has_access?('users', 'index')
78
78
  ```
79
79
 
@@ -96,7 +96,7 @@ class ApplicationController < ActionController::Base
96
96
  end
97
97
  ```
98
98
 
99
- **Obs.:** The **has_access?** method come from Controller Helper method which Ar gem has been created.
99
+ **Obs.:** The **has_access?** method come from Controller Helper method which Arpa gem has been created.
100
100
 
101
101
 
102
102
  ## Information
@@ -83,7 +83,7 @@ module Arpa
83
83
  class Railtie < ::Rails::Railtie
84
84
  initializer "arpa.configure_view_controller" do |app|
85
85
  ActiveSupport.on_load :action_controller do
86
- include Ar::Additions::Resource
86
+ include Arpa::Additions::Resource
87
87
  end
88
88
  end
89
89
  end
@@ -1,3 +1,3 @@
1
1
  module Arpa
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -1,4 +1,4 @@
1
- class CreateArTables < ActiveRecord::Migration
1
+ class CreateArpaTables < ActiveRecord::Migration
2
2
  def change
3
3
 
4
4
  create_table :repository_resources, :force => true do |t|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arpa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rachid Calazans
@@ -245,8 +245,8 @@ files:
245
245
  - lib/arpa/views/roles/new.html.erb
246
246
  - lib/arpa/views/roles/show.html.erb
247
247
  - lib/config/locales/arpa.en.yml
248
- - lib/generators/ar/install_generator.rb
249
- - lib/generators/ar/templates/migration.rb
248
+ - lib/generators/arpa/install_generator.rb
249
+ - lib/generators/arpa/templates/migration.rb
250
250
  - spec/factories/repository_actions.rb
251
251
  - spec/factories/repository_profiles.rb
252
252
  - spec/factories/repository_resources.rb