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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzkzOTE3YTQ1ZmEyYjc4YTEzNTc1MGJkYjM5ZWNkYzY0Mzg4ZTVhZg==
4
+ MTgxMDYzOTRjYTA4ZGEzMDhiZTE2NmVkNDZkODU1MmI1MTJkNGQxNw==
5
5
  data.tar.gz: !binary |-
6
- Y2I3ZmEzNWI1MGMzNmE1OWRjYTFlZmQzMTU2NzVkZjQ5Nzc2MWU3MA==
6
+ ZWQ1MGMwZTVhNjA2YjA3OThhODM2MzY3MTQxN2Y5MjcyMDI5ZmM4NA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZGFmYmQzZjk5NzRhOTAwMzM1N2MzZmUwN2IxZDI5YTFhMDExNmQyY2QyMzZh
10
- OWZhMjk2NmYzMTJmZWI0NjY4ZDA3NjIwN2FjMzBjNzVkMTZjNTM3MTIyZDEx
11
- NDMwNjRjYzY3NzRiNWNmMmFiMDY2MTZjNThjODYyZGU5ODE0OGU=
9
+ MTk4YjM1MjkwZmNlMTNhOTY4YmU2NTRkY2FkOTZhMDZkYzJlODE2NTlhZTU4
10
+ ZDA1Y2Y4NmZmMjdjYWZmODNlMjRmMjY1ZjRmYWYwYjAyNzliNjBlNWM4MDZj
11
+ ZjIxYjBiNzBhOTc0Y2EwMzYyOTc4MjQxNDAzYzRkNWFlODM5Y2E=
12
12
  data.tar.gz: !binary |-
13
- ZGUwNzc1NGFjNjY2YTRjYzBlYTc3ODgzNWE5Y2Y5YzA3Nzk1NmMxMzEwNWM4
14
- ZWE5N2U5MmIwMGQzZWY1ZWQwMTcyNjQxZGFhNzMwMDk1NGRmNGMzZTFjNmFj
15
- Y2NlZDkxYWViYjJlNGY1MWUxZDZiNmExNDNhM2I0MmMxZjJhOGQ=
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
@@ -1,3 +1,3 @@
1
1
  module CreativeCommonsRails
2
- VERSION = "0.9"
2
+ VERSION = "0.9.1"
3
3
  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: '0.9'
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-07-27 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler