my_app_info 0.2.0 → 0.3.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 +4 -2
- data/LICENSE.txt +1 -1
- data/README.md +18 -11
- data/lib/my_app_info/renderer.rb +4 -1
- data/lib/my_app_info/version.rb +1 -1
- data/my_app_info.gemspec +4 -2
- metadata +8 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4fff88cf74da68f5027de306c817b23d47588eb03b48d8d25437c4c498e07817
|
|
4
|
+
data.tar.gz: 885cb9ca2efbf179f65abe53b22e0edb075b8a9187d3c6fc7dd0087ec4b010ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7384b125f5eed736ccf9795a65d63158d3e34ae78325352f748b501975ec1f86bee023c7733811e71ece27666cc029d94bd637bbc1e98f80af1e27c5d404a295
|
|
7
|
+
data.tar.gz: 184137edb1e055897cf239b3ca1994ea9b34475707ceffed413e03ab44689b000475965f73549eb82061b3cac7b5e32ed86b32e4ef703b45d53ef32ed9a838a9
|
data/CHANGELOG
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# MyAppInfo
|
|
2
|
-
[](https://badge.fury.io/rb/my_app_info)
|
|
3
3
|
|
|
4
4
|
A small Gem that allows you to generate a copyright notice, application name and version number for your app.
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ gem 'my_app_info'
|
|
|
13
13
|
|
|
14
14
|
And then execute:
|
|
15
15
|
|
|
16
|
-
$ bundle
|
|
16
|
+
$ bundle install
|
|
17
17
|
|
|
18
18
|
Or install it yourself as:
|
|
19
19
|
|
|
@@ -21,22 +21,29 @@ Or install it yourself as:
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
I like to create
|
|
24
|
+
I like to create these three methods that are in the application_helper.rb file in my rails apps.
|
|
25
25
|
|
|
26
26
|
```ruby
|
|
27
27
|
def set_copyright
|
|
28
|
-
MyAppInfo::Renderer.app_copyright 'ACME Widgets', 'All
|
|
28
|
+
MyAppInfo::Renderer.app_copyright 'ACME Widgets', 'All Rights Reserved'
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def set_version
|
|
32
|
-
MyAppInfo::Renderer.app_version
|
|
32
|
+
MyAppInfo::Renderer.app_version 'ACME Widgets Blog', '1.5'
|
|
33
33
|
end
|
|
34
|
-
```
|
|
35
|
-
Then call the rendered methods at the bottom of the page in the application HTML template file.
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
def set_policy
|
|
36
|
+
MyAppInfo::Renderer.app_privacy 'Our Privacy Policy', 'https://www.acme-widgets.com/privacypolicy/'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def set_contactus
|
|
40
|
+
MyAppInfo::Renderer.app_contactus 'Contact Us', 'https://www.acme-widgets.com/contactus/'
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
Then call the rendered methods at the bottom of the page in your application HTML template file.
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<%= set_version %> | <%= set_policy %> | <%= set_copyright %> | <%= set_contactus %>
|
|
40
47
|
```
|
|
41
48
|
|
|
42
49
|
|
|
@@ -53,5 +60,5 @@ Bug reports and pull requests are welcome on GitLab at https://gitlab.com/mchils
|
|
|
53
60
|
|
|
54
61
|
## License
|
|
55
62
|
|
|
56
|
-
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
63
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). Enjoy!
|
|
57
64
|
|
data/lib/my_app_info/renderer.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module MyAppInfo
|
|
2
2
|
class Renderer
|
|
3
3
|
def self.app_copyright name, msg
|
|
4
|
-
"Copyright © #{Time.now.year}
|
|
4
|
+
"Copyright © #{Time.now.year} #{name}, #{msg}".html_safe
|
|
5
5
|
end
|
|
6
6
|
def self.app_version app_name, ver
|
|
7
7
|
"#{app_name}, Version #{ver}".html_safe
|
|
@@ -9,5 +9,8 @@ module MyAppInfo
|
|
|
9
9
|
def self.app_privacy privacy_text, privacy_url
|
|
10
10
|
"<a href='#{privacy_url}'>#{privacy_text}</a>".html_safe
|
|
11
11
|
end
|
|
12
|
+
def self.app_contactus contactus_text, contactus_url
|
|
13
|
+
"<a href='#{contactus_url}'>#{contactus_text}</a>".html_safe
|
|
14
|
+
end
|
|
12
15
|
end
|
|
13
16
|
end
|
data/lib/my_app_info/version.rb
CHANGED
data/my_app_info.gemspec
CHANGED
|
@@ -23,6 +23,8 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
24
24
|
spec.require_paths = ["lib"]
|
|
25
25
|
|
|
26
|
-
spec.add_development_dependency "bundler", "~>
|
|
27
|
-
spec.add_development_dependency "rake", "~>
|
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.6.9"
|
|
27
|
+
spec.add_development_dependency "rake", "~> 13.3"
|
|
28
|
+
|
|
29
|
+
spec.required_ruby_version = '>= 3.0.4'
|
|
28
30
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: my_app_info
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Chilson
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -16,28 +15,28 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: 2.6.9
|
|
20
19
|
type: :development
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: 2.6.9
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: rake
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
32
|
+
version: '13.3'
|
|
34
33
|
type: :development
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
39
|
+
version: '13.3'
|
|
41
40
|
description: A small Rails Gem that allows you to generate a copyright notice, a privacy
|
|
42
41
|
policy link, application name and version number for your Rails application.
|
|
43
42
|
email:
|
|
@@ -64,7 +63,6 @@ homepage: https://gitlab.com/mchilson/my_app_info
|
|
|
64
63
|
licenses:
|
|
65
64
|
- MIT
|
|
66
65
|
metadata: {}
|
|
67
|
-
post_install_message:
|
|
68
66
|
rdoc_options: []
|
|
69
67
|
require_paths:
|
|
70
68
|
- lib
|
|
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
72
70
|
requirements:
|
|
73
71
|
- - ">="
|
|
74
72
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
73
|
+
version: 3.0.4
|
|
76
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
75
|
requirements:
|
|
78
76
|
- - ">="
|
|
79
77
|
- !ruby/object:Gem::Version
|
|
80
78
|
version: '0'
|
|
81
79
|
requirements: []
|
|
82
|
-
rubygems_version: 3.
|
|
83
|
-
signing_key:
|
|
80
|
+
rubygems_version: 3.6.9
|
|
84
81
|
specification_version: 4
|
|
85
82
|
summary: A Rails Gem that adds copyright, a privacy policy link, and version info
|
|
86
83
|
to your Rails application.
|