acts_as_template 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 05f6fdba7f1a2c79fb43a6361c04ad4cbb052e7d4dc51ee2fce3648df7340152
4
+ data.tar.gz: 205ef4ab6a7ed5bc3dda188f89c414f0a0f97e94f8093e794803c6d82f34b3ce
5
+ SHA512:
6
+ metadata.gz: c5b33a031d789cc4a9c083e8484fbbbd7af7a5a0a89f64cf68590e3a17e236d63fd9c835d43089215a772bab7210e8bc765f05393a89b6bec38a8683d6bdc7a8
7
+ data.tar.gz: 22f337665f40223453e96097560dd497ff352a8086191c81d5413abb4ebd203e2d686ba30caa78f58ffdb9d37528324822cf9f23b64a95aa9911a779421175c1
@@ -0,0 +1,20 @@
1
+ Copyright 2019 Myk Klemme
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.
@@ -0,0 +1,49 @@
1
+ # ActsAsTemplate
2
+
3
+
4
+ ## Usage
5
+
6
+ ```ruby
7
+ class User < ApplicationRecord
8
+ acts_as_template
9
+ end
10
+ ```
11
+
12
+ ## Installation
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'acts_as_template'
17
+ ```
18
+
19
+ And then execute:
20
+ ```bash
21
+ $ bundle
22
+ ```
23
+
24
+ Or install it yourself as:
25
+ ```bash
26
+ $ gem install acts_as_template
27
+ ```
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/invisiblehats/invisible_standards. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
+
37
+ ## Code of Conduct
38
+
39
+ Everyone interacting in the ClassName project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/invisible_standards/blob/master/CODE_OF_CONDUCT.md).
40
+
41
+ ## Development team
42
+
43
+ ### People
44
+
45
+ - [Myk Klemme - @mklemme](https://github.com/mklemme) Lead developer and maintainer for this project.
46
+
47
+ ### Partners
48
+
49
+ - [Invisible Hat Ventures - @invisiblehats](https://github.com/invisiblehats) A California-based idea incubator
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ApplicationRecord < ActiveRecord::Base
4
+ include ActsAsTemplate
5
+
6
+ self.abstract_class = true
7
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'acts_as_template/engine'
4
+ require 'invisible_standards'
5
+
6
+ module ActsAsTemplate
7
+ extend ActiveSupport::Concern
8
+
9
+ included do
10
+ def set_foo_bar_field(string)
11
+ write_attribute(self.class.foo_bar_field, string)
12
+ end
13
+ end
14
+
15
+ class_methods do
16
+ def acts_as_template(options = {})
17
+ cattr_accessor :foo_bar_field,
18
+ default: options.fetch(:foo_bar_field, '')
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActsAsTemplate
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActsAsTemplate
4
+ VERSION = '0.1.0'
5
+ NAME = 'acts_as_template'
6
+ REPO = 'invisiblehats/acts_as_template'
7
+ AUTHORS = ['Myk Klemme'].freeze
8
+ EMAIL = ['mykklemme@gmail.com'].freeze
9
+ HOMEPAGE = 'https://github.com/invisiblehats/acts_as_template'
10
+ SUMMARY = 'Summary of ActsAsTemplate.'
11
+ DESCRIPTION = 'Description of ActsAsTemplate.'
12
+ LICENSE = 'MIT'
13
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ # desc "Explaining what the task does"
3
+ # task :acts_as_template do
4
+ # # Task goes here
5
+ # end
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: acts_as_template
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Myk Klemme
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-11-18 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: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: invisible_standards
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0.70'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0.70'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec_junit_formatter
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Description of ActsAsTemplate.
84
+ email:
85
+ - mykklemme@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - MIT-LICENSE
91
+ - README.md
92
+ - app/models/application_record.rb
93
+ - lib/acts_as_template.rb
94
+ - lib/acts_as_template/engine.rb
95
+ - lib/acts_as_template/project_meta.rb
96
+ - lib/tasks/acts_as_template_tasks.rake
97
+ homepage: https://github.com/invisiblehats/acts_as_template
98
+ licenses:
99
+ - MIT
100
+ metadata:
101
+ allowed_push_host: https://rubygems.org
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubygems_version: 3.0.3
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: Summary of ActsAsTemplate.
121
+ test_files: []