javascript-securehash-rails 0.0.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -8,3 +8,5 @@ test/dummy/tmp/
8
8
  test/dummy/.sass-cache
9
9
  lib/tasks
10
10
  *.gem
11
+ Gemfile*
12
+ Rakefile
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012 YOURNAME
1
+ Copyright 2012 Guillermo Guerrero
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Javascript Secure Hash for RubyonRails
2
+ The *Javascript Secure Hash* functions collection is ready to require and use in your Rails project app.
3
+
4
+ This Rails plugin is an easy way to use the most common secure hash algorithms on your *Javascript/CoffeScript* files whenever are required.
5
+ The following digest algorithms are available:
6
+ * [MD4 (Deprecated)](http://en.wikipedia.org/wiki/MD4)
7
+ * [MD5](http://en.wikipedia.org/wiki/MD5)
8
+ * [RIPEMD-160](http://en.wikipedia.org/wiki/RIPEMD)
9
+ * [SHA-1](http://en.wikipedia.org/wiki/SHA-1)
10
+ * [SHA-2(256)](http://en.wikipedia.org/wiki/SHA-2)
11
+ * [SHA-2(512)](http://en.wikipedia.org/wiki/SHA-2)
12
+
13
+ ## Javascript Secure Hash Author
14
+ The author of all these JS algorithms is Paul Johnston.
15
+ More about his work at [pajhome.org.uk](http://pajhome.org.uk/crypt/md5/index.html).
16
+
17
+ ## Install me!
18
+ To install this *gem*
19
+
20
+ $ gem install javascript-securehash-rails
21
+
22
+ ## Or bundle me!
23
+ Add this line to your *Gemfile*
24
+
25
+ gem "javascript-securehash-rails"
26
+
27
+ # Usage
28
+ Just add the digest algorithm and use the digest functions on your
29
+ *Javascript/CoffeeScript* files.
30
+
31
+ ## Require it
32
+ Add this line to your *app/assets/javascripts/application.js* file
33
+
34
+ //= require securehash
35
+
36
+ Or if your want only to attach an specific digest algorithm do as
37
+
38
+ //= require securehash/md4
39
+ //= require securehash/md5
40
+ //= require securehash/ripemd160
41
+ //= require securehash/sha1
42
+ //= require securehash/sha256
43
+ //= require securehash/sha512
44
+
45
+ The available functions by it's algorithms are:
46
+ * **calcMD4("AMessage")** (for MD4)
47
+ * **hex_md5("AMessage")** (for MD5)
48
+ * **hex_rmd160("AMessage")** (for RIPEMD-160)
49
+ * **hex_sha1("AMessage")** (for SHA-1)
50
+ * **hex_sha256("AMessage")** (for SHA2 256 bits)
51
+ * **hex_sha512("AMessage")** (for SHA2 512 bits)
52
+
53
+ ## Example
54
+ Digesting these strings
55
+
56
+ alert("message digest -> " + hex_md5("message digest"));
57
+ aler("160-bit hash ->" + hex_sha1("160-bit hash"));
58
+
59
+ Will pop-up the following messages:
60
+
61
+ **message digest -> f96b697d7cb7938d525a2f31aaf161d0**
62
+
63
+ **160-bit hash -> 90d925d853c3d35cd54070bb75280fefad9de9e7**
64
+
65
+ # License
66
+ This project uses [*MIT-LICENSE*](http://en.wikipedia.org/wiki/MIT_License).
@@ -9,18 +9,17 @@ Gem::Specification.new do |s|
9
9
  s.version = JavascriptSecurehashRails::VERSION
10
10
  s.authors = ["Guillermo Guerrero"]
11
11
  s.email = ["g.guerrero.bus@gmail.com"]
12
- s.homepage = "https://rubygems.org/gems/javascript-securehash-rails"
13
- s.summary = "Javascript Secure Hash collection as a Rails Plugin."
14
- s.description = %(Javascript Secure Hash collection files ready to
12
+ s.homepage = "https://github.com/gguerrero/javascript-securehash-rails"
13
+ s.summary = "Javascript Secure Hash functions collection as a Rails Plugin"
14
+ s.description = %(The Javascript Secure Hash functions collection is ready to
15
15
  require and use in your Rails app project.
16
16
  ).strip.gsub(/\s{2,}/, ' ')
17
17
 
18
18
  s.files = `git ls-files`.split("\n")
19
19
 
20
20
  s.has_rdoc = true
21
- s.extra_rdoc_files = %w[ README.rdoc ]
22
- s.rdoc_options += %w[ --title JavascriptSecurehashRails
23
- --main README.rdoc
21
+ s.extra_rdoc_files = %w[ MIT-LICENSE ]
22
+ s.rdoc_options += %w[ --title "Javascript Secure Hash Rails"
24
23
  --inline-source ]
25
24
 
26
25
  s.add_dependency "rails", ">= 3.1"
@@ -1,3 +1,3 @@
1
1
  module JavascriptSecurehashRails
2
- VERSION = "0.0.2"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -1,11 +1,11 @@
1
1
  // Full secure hash algorithm files load. All the hash decoding functions are
2
2
  // available once loaded this file, i.e:
3
- // * MD4: calcMD4("Mystring")
4
- // * MD5: hex_md5("Mystring")
5
- // * RIPEMD160: hex_rmd160("Mystring")
6
- // * SHA-1: hex_sha1("Mystring")
7
- // * SHA-256: hex_sha256("Mystring")
8
- // * SHA-512: hex_sha512("Mystring")
3
+ // * MD4: calcMD4("A_Message")
4
+ // * MD5: hex_md5("A_Message")
5
+ // * RIPEMD-160: hex_rmd160("A_Message")
6
+ // * SHA-1: hex_sha1("A_Message")
7
+ // * SHA-2(256): hex_sha256("A_Message")
8
+ // * SHA-2(512): hex_sha512("A_Message")
9
9
  //
10
10
  // Get more info at secure hash JS algorithms authors site:
11
11
  // http://pajhome.org.uk/crypt/md5/index.html
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: javascript-securehash-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -27,21 +27,18 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.1'
30
- description: Javascript Secure Hash collection files ready to require and use in your
31
- Rails app project.
30
+ description: The Javascript Secure Hash functions collection is ready to require and
31
+ use in your Rails app project.
32
32
  email:
33
33
  - g.guerrero.bus@gmail.com
34
34
  executables: []
35
35
  extensions: []
36
36
  extra_rdoc_files:
37
- - README.rdoc
37
+ - MIT-LICENSE
38
38
  files:
39
39
  - .gitignore
40
- - Gemfile
41
- - Gemfile.lock
42
40
  - MIT-LICENSE
43
- - README.rdoc
44
- - Rakefile
41
+ - README.md
45
42
  - javascript-securehash-rails.gemspec
46
43
  - lib/javascript-securehash-rails.rb
47
44
  - lib/javascript-securehash-rails/engine.rb
@@ -53,14 +50,15 @@ files:
53
50
  - vendor/assets/javascripts/securehash/sha1.js
54
51
  - vendor/assets/javascripts/securehash/sha256.js
55
52
  - vendor/assets/javascripts/securehash/sha512.js
56
- homepage: https://rubygems.org/gems/javascript-securehash-rails
53
+ homepage: https://github.com/gguerrero/javascript-securehash-rails
57
54
  licenses: []
58
55
  post_install_message:
59
56
  rdoc_options:
60
57
  - --title
61
- - JavascriptSecurehashRails
62
- - --main
63
- - README.rdoc
58
+ - ! '"Javascript'
59
+ - Secure
60
+ - Hash
61
+ - Rails"
64
62
  - --inline-source
65
63
  require_paths:
66
64
  - lib
@@ -81,5 +79,6 @@ rubyforge_project:
81
79
  rubygems_version: 1.8.24
82
80
  signing_key:
83
81
  specification_version: 3
84
- summary: Javascript Secure Hash collection as a Rails Plugin.
82
+ summary: Javascript Secure Hash functions collection as a Rails Plugin
85
83
  test_files: []
84
+ has_rdoc: true
data/Gemfile DELETED
@@ -1,17 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Declare your gem's dependencies in javascript-securehash-rails.gemspec.
4
- # Bundler will treat runtime dependencies like base dependencies, and
5
- # development dependencies will be added by default to the :development group.
6
- gemspec
7
-
8
- # jquery-rails is used by the dummy application
9
- gem "jquery-rails"
10
-
11
- # Declare any dependencies that are still in development here instead of in
12
- # your gemspec. These might include edge Rails or gems from your path or
13
- # Git. Remember to move these dependencies to your gemspec before releasing
14
- # your gem to rubygems.org.
15
-
16
- # To use debugger
17
- # gem 'debugger'
data/Gemfile.lock DELETED
@@ -1,97 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- javascript-securehash-rails (0.0.1)
5
- rails (~> 3.2.8)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (3.2.8)
11
- actionpack (= 3.2.8)
12
- mail (~> 2.4.4)
13
- actionpack (3.2.8)
14
- activemodel (= 3.2.8)
15
- activesupport (= 3.2.8)
16
- builder (~> 3.0.0)
17
- erubis (~> 2.7.0)
18
- journey (~> 1.0.4)
19
- rack (~> 1.4.0)
20
- rack-cache (~> 1.2)
21
- rack-test (~> 0.6.1)
22
- sprockets (~> 2.1.3)
23
- activemodel (3.2.8)
24
- activesupport (= 3.2.8)
25
- builder (~> 3.0.0)
26
- activerecord (3.2.8)
27
- activemodel (= 3.2.8)
28
- activesupport (= 3.2.8)
29
- arel (~> 3.0.2)
30
- tzinfo (~> 0.3.29)
31
- activeresource (3.2.8)
32
- activemodel (= 3.2.8)
33
- activesupport (= 3.2.8)
34
- activesupport (3.2.8)
35
- i18n (~> 0.6)
36
- multi_json (~> 1.0)
37
- arel (3.0.2)
38
- builder (3.0.3)
39
- erubis (2.7.0)
40
- hike (1.2.1)
41
- i18n (0.6.1)
42
- journey (1.0.4)
43
- jquery-rails (2.1.2)
44
- railties (>= 3.1.0, < 5.0)
45
- thor (~> 0.14)
46
- json (1.7.5)
47
- mail (2.4.4)
48
- i18n (>= 0.4.0)
49
- mime-types (~> 1.16)
50
- treetop (~> 1.4.8)
51
- mime-types (1.19)
52
- multi_json (1.3.6)
53
- polyglot (0.3.3)
54
- rack (1.4.1)
55
- rack-cache (1.2)
56
- rack (>= 0.4)
57
- rack-ssl (1.3.2)
58
- rack
59
- rack-test (0.6.1)
60
- rack (>= 1.0)
61
- rails (3.2.8)
62
- actionmailer (= 3.2.8)
63
- actionpack (= 3.2.8)
64
- activerecord (= 3.2.8)
65
- activeresource (= 3.2.8)
66
- activesupport (= 3.2.8)
67
- bundler (~> 1.0)
68
- railties (= 3.2.8)
69
- railties (3.2.8)
70
- actionpack (= 3.2.8)
71
- activesupport (= 3.2.8)
72
- rack-ssl (~> 1.3.2)
73
- rake (>= 0.8.7)
74
- rdoc (~> 3.4)
75
- thor (>= 0.14.6, < 2.0)
76
- rake (0.9.2.2)
77
- rdoc (3.12)
78
- json (~> 1.4)
79
- sprockets (2.1.3)
80
- hike (~> 1.2)
81
- rack (~> 1.0)
82
- tilt (~> 1.1, != 1.3.0)
83
- sqlite3 (1.3.6)
84
- thor (0.16.0)
85
- tilt (1.3.3)
86
- treetop (1.4.10)
87
- polyglot
88
- polyglot (>= 0.3.1)
89
- tzinfo (0.3.33)
90
-
91
- PLATFORMS
92
- ruby
93
-
94
- DEPENDENCIES
95
- javascript-securehash-rails!
96
- jquery-rails
97
- sqlite3
data/README.rdoc DELETED
@@ -1,7 +0,0 @@
1
- = JavascriptSecurehashRails
2
- Javascript Secure Hash collection files ready to require and use in your Rails app project.
3
- This project uses MIT-LICENSE.
4
-
5
- = Javascript Secure Hash Author
6
- The author of all the JS algorithms is Paul Johnston
7
- See more about his work at http://pajhome.org.uk/crypt/md5/index.html
data/Rakefile DELETED
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env rake
2
- begin
3
- require 'bundler/setup'
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- end
7
- begin
8
- require 'rdoc/task'
9
- rescue LoadError
10
- require 'rdoc/rdoc'
11
- require 'rake/rdoctask'
12
- RDoc::Task = Rake::RDocTask
13
- end
14
-
15
- RDoc::Task.new(:rdoc) do |rdoc|
16
- rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'JavascriptSecurehashRails'
18
- rdoc.options << '--line-numbers'
19
- rdoc.rdoc_files.include('README.rdoc')
20
- rdoc.rdoc_files.include('lib/**/*.rb')
21
- end
22
-
23
-
24
-
25
-
26
- Bundler::GemHelper.install_tasks
27
-
28
- require 'rake/testtask'
29
-
30
- Rake::TestTask.new(:test) do |t|
31
- t.libs << 'lib'
32
- t.libs << 'test'
33
- t.pattern = 'test/**/*_test.rb'
34
- t.verbose = false
35
- end
36
-
37
-
38
- task :default => :test