apicasso 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +84 -84
- data/Rakefile +32 -32
- data/app/assets/config/apicasso_manifest.js +2 -2
- data/app/assets/javascripts/apicasso/application.js +15 -15
- data/app/assets/stylesheets/apicasso/application.css +15 -15
- data/app/controllers/apicasso/apidocs_controller.rb +0 -0
- data/app/controllers/apicasso/application_controller.rb +104 -104
- data/app/controllers/apicasso/crud_controller.rb +148 -148
- data/app/controllers/concerns/orderable.rb +44 -44
- data/app/helpers/apicasso/application_helper.rb +4 -4
- data/app/jobs/apicasso/application_job.rb +4 -4
- data/app/mailers/apicasso/application_mailer.rb +6 -6
- data/app/models/apicasso/ability.rb +40 -40
- data/app/models/apicasso/application_record.rb +6 -6
- data/app/models/apicasso/key.rb +25 -25
- data/app/models/apicasso/request.rb +8 -8
- data/app/views/layouts/apicasso/application.html.erb +16 -16
- data/config/routes.rb +13 -13
- data/lib/apicasso/active_record_extension.rb +0 -0
- data/lib/apicasso/engine.rb +6 -6
- data/lib/apicasso/version.rb +3 -3
- data/lib/apicasso.rb +9 -9
- data/lib/generators/apicasso/install/install_generator.rb +25 -25
- data/lib/generators/apicasso/install/templates/create_apicasso_tables.rb +17 -17
- data/lib/tasks/apicasso_tasks.rake +4 -4
- metadata +3 -3
data/lib/apicasso.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'apicasso/version'
|
4
|
-
require 'apicasso/engine'
|
5
|
-
require 'apicasso/active_record_extension'
|
6
|
-
|
7
|
-
module Apicasso
|
8
|
-
# Your code goes here...
|
9
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'apicasso/version'
|
4
|
+
require 'apicasso/engine'
|
5
|
+
require 'apicasso/active_record_extension'
|
6
|
+
|
7
|
+
module Apicasso
|
8
|
+
# Your code goes here...
|
9
|
+
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
require 'rails/generators/migration'
|
2
|
-
|
3
|
-
module Apicasso
|
4
|
-
module Generators
|
5
|
-
class InstallGenerator < ::Rails::Generators::Base
|
6
|
-
include Rails::Generators::Migration
|
7
|
-
source_root File.expand_path('../templates', __FILE__)
|
8
|
-
desc 'Add the required migrations to run APIcasso'
|
9
|
-
|
10
|
-
def self.next_migration_number(path)
|
11
|
-
if @prev_migration_nr
|
12
|
-
@prev_migration_nr += 1
|
13
|
-
else
|
14
|
-
@prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
15
|
-
end
|
16
|
-
@prev_migration_nr.to_s
|
17
|
-
end
|
18
|
-
|
19
|
-
def copy_migrations
|
20
|
-
migration_template 'create_apicasso_tables.rb',
|
21
|
-
'db/migrate/create_apicasso_tables.rb'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
1
|
+
require 'rails/generators/migration'
|
2
|
+
|
3
|
+
module Apicasso
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
desc 'Add the required migrations to run APIcasso'
|
9
|
+
|
10
|
+
def self.next_migration_number(path)
|
11
|
+
if @prev_migration_nr
|
12
|
+
@prev_migration_nr += 1
|
13
|
+
else
|
14
|
+
@prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
|
15
|
+
end
|
16
|
+
@prev_migration_nr.to_s
|
17
|
+
end
|
18
|
+
|
19
|
+
def copy_migrations
|
20
|
+
migration_template 'create_apicasso_tables.rb',
|
21
|
+
'db/migrate/create_apicasso_tables.rb'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,17 +1,17 @@
|
|
1
|
-
class CreateApicassoTables < ActiveRecord::Migration[5.0]
|
2
|
-
def change
|
3
|
-
create_table :apicasso_keys, id: :uuid do |t|
|
4
|
-
t.json :scope
|
5
|
-
t.integer :scope_type
|
6
|
-
t.json :request_limiting
|
7
|
-
t.text :token
|
8
|
-
t.datetime :deleted_at
|
9
|
-
t.timestamps null: false
|
10
|
-
end
|
11
|
-
create_table :apicasso_requests, id: :uuid do |t|
|
12
|
-
t.text :api_key_id
|
13
|
-
t.json :object
|
14
|
-
t.timestamps null: false
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
1
|
+
class CreateApicassoTables < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
create_table :apicasso_keys, id: :uuid do |t|
|
4
|
+
t.json :scope
|
5
|
+
t.integer :scope_type
|
6
|
+
t.json :request_limiting
|
7
|
+
t.text :token
|
8
|
+
t.datetime :deleted_at
|
9
|
+
t.timestamps null: false
|
10
|
+
end
|
11
|
+
create_table :apicasso_requests, id: :uuid do |t|
|
12
|
+
t.text :api_key_id
|
13
|
+
t.json :object
|
14
|
+
t.timestamps null: false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# desc "Explaining what the task does"
|
2
|
-
# task :apicasso do
|
3
|
-
# # Task goes here
|
4
|
-
# end
|
1
|
+
# desc "Explaining what the task does"
|
2
|
+
# task :apicasso do
|
3
|
+
# # Task goes here
|
4
|
+
# end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apicasso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Bellincanta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cancancan
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.7.
|
143
|
+
rubygems_version: 2.7.6
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: An abstract API design as a mountable engine
|