creative_commons_rails 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/creative_commons_rails/license_info.rb +12 -0
- data/lib/creative_commons_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTgxMDYzOTRjYTA4ZGEzMDhiZTE2NmVkNDZkODU1MmI1MTJkNGQxNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWQ1MGMwZTVhNjA2YjA3OThhODM2MzY3MTQxN2Y5MjcyMDI5ZmM4NA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTk4YjM1MjkwZmNlMTNhOTY4YmU2NTRkY2FkOTZhMDZkYzJlODE2NTlhZTU4
|
10
|
+
ZDA1Y2Y4NmZmMjdjYWZmODNlMjRmMjY1ZjRmYWYwYjAyNzliNjBlNWM4MDZj
|
11
|
+
ZjIxYjBiNzBhOTc0Y2EwMzYyOTc4MjQxNDAzYzRkNWFlODM5Y2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzI2ZTUxNGJmMWZjMWJhYjBlOWVjNmI3ZmZkY2ViNmE1ZjMwZjUzYWE0ZGQy
|
14
|
+
MWQxMGJjM2U4MDRlNDcxY2JiY2ZiYWQzYmRiMjQwYjY3MTc5N2RlMWEyYTU2
|
15
|
+
ZjAxYmQ5YThhNGVlYjY4YzNmM2U0MzkxMTllNjBkOTAwYzk3ZjE=
|
@@ -16,6 +16,18 @@ module CreativeCommonsRails
|
|
16
16
|
LicenseInfo.new(attributes[:type],attributes[:jurisdiction],attributes[:version])
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.available_jurisdictions
|
20
|
+
license_index.keys
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.available_types(jurisdiction)
|
24
|
+
license_index[jurisdiction.to_s].keys
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.available_versions(jurisdiction, type)
|
28
|
+
license_index[jurisdiction].select{|k,v| v[type]}.keys
|
29
|
+
end
|
30
|
+
|
19
31
|
def initialize(type, jurisdiction, version)
|
20
32
|
@type, @jurisdiction, @version = type, jurisdiction, version
|
21
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: creative_commons_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kent Mewhort
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|