license 0.5.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
@@ -6,15 +6,21 @@ License is a gem that can generate and validate license keys. This can powered
6
6
 
7
7
  To install, use these commands:
8
8
 
9
- gem sources -a http://gems.github.com # you only need to run this once
10
- sudo gem install evanwalsh-license
9
+ gem sources -a http://rubygems.org # you only need to run this if you're not using the latest RubyGems
10
+ sudo gem install license
11
11
 
12
+ === Using with Rails 2.X
13
+
12
14
  To use this in your Rails app, add this to your config/environment.rb:
13
15
 
14
16
  Rails::Initializer.run do |config|
15
- config.gem 'evanwalsh-license', :lib => 'license', :source => 'http://gems.github.com'
17
+ config.gem 'license'
16
18
  end
17
19
 
20
+ === Using with Rails 3.X
21
+
22
+ I won't code or test with Rails 3 until it has been officially released.
23
+
18
24
  == Usage
19
25
 
20
26
  For a new license, call the License.new method with the name, email, and product name as the arguments
@@ -29,7 +35,10 @@ To check if a key is valid, use the validate method with they key as the argumen
29
35
 
30
36
  @license.validate("3F7B-D428-ED3A-3636") # returns true
31
37
 
38
+ == Notes
39
+
40
+ Please note that this is not a bulletproof copy-protection solution. It's based on more of an honor system.
32
41
 
33
42
  == Copyright
34
43
 
35
- Copyright (c) 2009 Evan Walsh. See LICENSE for details.
44
+ Copyright (c) 2009-2010 Evan Walsh. See LICENSE for details.
data/Rakefile CHANGED
@@ -5,14 +5,15 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "license"
8
- gem.summary = %Q{TODO}
8
+ gem.summary = %Q{A honor-based license key generator}
9
9
  gem.email = "evan@nothingconcept.com"
10
10
  gem.homepage = "http://github.com/evanwalsh/license"
11
11
  gem.authors = ["evanwalsh"]
12
12
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
13
  end
14
+ Jeweler::GemcutterTasks.new
14
15
  rescue LoadError
15
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
16
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
16
17
  end
17
18
 
18
19
  require 'rake/testtask'
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 6
4
- :patch: 0
4
+ :patch: 2
@@ -0,0 +1,49 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{license}
8
+ s.version = "0.6.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["evanwalsh"]
12
+ s.date = %q{2010-03-07}
13
+ s.email = %q{evan@nothingconcept.com}
14
+ s.extra_rdoc_files = [
15
+ "LICENSE",
16
+ "README.rdoc"
17
+ ]
18
+ s.files = [
19
+ ".document",
20
+ ".gitignore",
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION.yml",
25
+ "lib/license.rb",
26
+ "license.gemspec",
27
+ "test/license_test.rb",
28
+ "test/test_helper.rb"
29
+ ]
30
+ s.homepage = %q{http://github.com/evanwalsh/license}
31
+ s.rdoc_options = ["--charset=UTF-8"]
32
+ s.require_paths = ["lib"]
33
+ s.rubygems_version = %q{1.3.6}
34
+ s.summary = %q{A honor-based license key generator}
35
+ s.test_files = [
36
+ "test/license_test.rb",
37
+ "test/test_helper.rb"
38
+ ]
39
+
40
+ if s.respond_to? :specification_version then
41
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
+ s.specification_version = 3
43
+
44
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
45
+ else
46
+ end
47
+ else
48
+ end
49
+ end
@@ -32,6 +32,7 @@ class LicenseTest < Test::Unit::TestCase
32
32
 
33
33
  should "return nil when an invalid key is validated" do
34
34
  assert_equal nil, @license.validate(@license.generate.reverse)
35
+ assert_equal nil, @license.validate("EVAN WALSH IS AWESOME")
35
36
  end
36
37
 
37
38
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: license
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 6
8
+ - 2
9
+ version: 0.6.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - evanwalsh
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-04-18 00:00:00 -04:00
17
+ date: 2010-03-07 00:00:00 -05:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -23,11 +28,14 @@ extra_rdoc_files:
23
28
  - LICENSE
24
29
  - README.rdoc
25
30
  files:
31
+ - .document
32
+ - .gitignore
26
33
  - LICENSE
27
34
  - README.rdoc
28
35
  - Rakefile
29
36
  - VERSION.yml
30
37
  - lib/license.rb
38
+ - license.gemspec
31
39
  - test/license_test.rb
32
40
  - test/test_helper.rb
33
41
  has_rdoc: true
@@ -43,21 +51,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
51
  requirements:
44
52
  - - ">="
45
53
  - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
46
56
  version: "0"
47
- version:
48
57
  required_rubygems_version: !ruby/object:Gem::Requirement
49
58
  requirements:
50
59
  - - ">="
51
60
  - !ruby/object:Gem::Version
61
+ segments:
62
+ - 0
52
63
  version: "0"
53
- version:
54
64
  requirements: []
55
65
 
56
66
  rubyforge_project:
57
- rubygems_version: 1.3.5
67
+ rubygems_version: 1.3.6
58
68
  signing_key:
59
- specification_version: 2
60
- summary: A lib for generating and validating license keys
69
+ specification_version: 3
70
+ summary: A honor-based license key generator
61
71
  test_files:
62
72
  - test/license_test.rb
63
73
  - test/test_helper.rb