cisbin 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 50249ad53ebaa0057a762e1e6f64e91a27c4b773fac1672846966b455dcf41aa
4
+ data.tar.gz: 61e5700fe335dde69ac7b8bed2172bfa0b2db0dbb8bb86b4f4b7e199b8747e92
5
+ SHA512:
6
+ metadata.gz: 9f4996f7b78c8b7b39382f0c614783adc3d82be15173afc36652e15e487d6d985dc38ba5636e060ff96102170f13fc0156e33f32b76db4e8b71a364fbcd3e147
7
+ data.tar.gz: 7b0a56f9a7a2e3593c9537121c5ce09a08cad64381e5fbcefe1c0b34e072896b2437b70ed59dce9eacc957c156915f9eebb4dd1d12fc86f35ec601fc864c5a7f
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2022 ervin
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
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:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
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.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Cisbin
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem "cisbin"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install cisbin
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/setup"
2
+
3
+ require "bundler/gem_tasks"
@@ -0,0 +1,17 @@
1
+ module Cisbin
2
+ module ActsAsCisbin
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ def squawk(string)
7
+ write_attribute(self.class.cisbin_text_field, string.to_squawk)
8
+ end
9
+ end
10
+
11
+ class_methods do
12
+ def acts_as_cisbin(options = {})
13
+ cattr_accessor :cisbin_text_field, default: (options[:cisbin_text_field] || :last_squawk).to_s
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ class String
2
+ def to_squawk
3
+ "squawk! #{self}".strip
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module Cisbin
2
+ class Railtie < ::Rails::Railtie
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Cisbin
2
+ VERSION = "0.1.0"
3
+ end
data/lib/cisbin.rb ADDED
@@ -0,0 +1,8 @@
1
+ require "cisbin/version"
2
+ require "cisbin/railtie"
3
+ require "cisbin/core_ext"
4
+ require "cisbin/acts_as_cisbin"
5
+
6
+ module Cisbin
7
+ # Your code goes here...
8
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :cisbin do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cisbin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ervinismu
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-12-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 7.0.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 7.0.4
27
+ description: Casbin for Rails
28
+ email:
29
+ - social.ervin@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - MIT-LICENSE
35
+ - README.md
36
+ - Rakefile
37
+ - lib/cisbin.rb
38
+ - lib/cisbin/acts_as_cisbin.rb
39
+ - lib/cisbin/core_ext.rb
40
+ - lib/cisbin/railtie.rb
41
+ - lib/cisbin/version.rb
42
+ - lib/tasks/cisbin_tasks.rake
43
+ homepage: https://github.com/ervinismu/cisbin
44
+ licenses:
45
+ - MIT
46
+ metadata:
47
+ homepage_uri: https://github.com/ervinismu/cisbin
48
+ source_code_uri: https://github.com/ervinismu/cisbin
49
+ changelog_uri: https://github.com/ervinismu/cisbinCHANGELOG.md
50
+ post_install_message:
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ requirements: []
65
+ rubygems_version: 3.3.7
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Casbin for Rails
69
+ test_files: []