whiteorblack-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ sauce
6
+ tmp
7
+ .DS_Store
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
@@ -0,0 +1,4 @@
1
+ # 0.0.1 / 2014-02-13
2
+
3
+ whiteorblack gearing up!
4
+
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "http://rubygems.org"
2
+ gemspec
@@ -0,0 +1,5 @@
1
+ require 'bundler/gem_tasks'
2
+
3
+ task :default do
4
+ puts "Hello visualsearch-rails!"
5
+ end
@@ -0,0 +1 @@
1
+ !!! updating soon !!!
@@ -0,0 +1,21 @@
1
+ function idealTextColor(bgColor) {
2
+
3
+ var nThreshold = 105;
4
+ var components = getRGBComponents(bgColor);
5
+ var bgDelta = (components.R * 0.299) + (components.G * 0.587) + (components.B * 0.114);
6
+
7
+ return ((255 - bgDelta) < nThreshold) ? "#000000" : "#ffffff";
8
+ }
9
+
10
+ function getRGBComponents(color) {
11
+
12
+ var r = color.substring(1, 3);
13
+ var g = color.substring(3, 5);
14
+ var b = color.substring(5, 7);
15
+
16
+ return {
17
+ R: parseInt(r, 16),
18
+ G: parseInt(g, 16),
19
+ B: parseInt(b, 16)
20
+ };
21
+ }
@@ -0,0 +1,2 @@
1
+ require 'whiteorblack/version'
2
+ require 'whiteorblakc/rails'
@@ -0,0 +1,6 @@
1
+ module Whiteorblack
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module Whiteorblack
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "whiteorblack/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "whiteorblack-rails"
7
+ s.version = Whiteorblack::VERSION
8
+ s.authors = ["Nikita Singh"]
9
+ s.date = '2014-02-16'
10
+ s.email = ["nikitaa_singh@yahoo.co.in"]
11
+ s.summary = %q{Gem for a deciding whether you need a balck font color or white !! :D}
12
+ s.description = %q{Gem for a deciding whether you need a balck font color or white !! :D}
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+
17
+ s.require_paths = ["lib"]
18
+ s.licenses = ['MIT']
19
+ s.homepage = 'https://github.com/visual-search/visualsearch-rails'
20
+ s.add_dependency "railties", ">= 3.1"
21
+ s.add_development_dependency "bundler", "~> 1.0"
22
+ s.add_development_dependency "rails", ">= 3.1"
23
+ s.add_development_dependency 'rake'
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: whiteorblack-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Nikita Singh
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-02-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: railties
16
+ requirement: &71521810 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *71521810
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &71521560 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *71521560
36
+ - !ruby/object:Gem::Dependency
37
+ name: rails
38
+ requirement: &71521330 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '3.1'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *71521330
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: &71521140 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *71521140
58
+ description: Gem for a deciding whether you need a balck font color or white !! :D
59
+ email:
60
+ - nikitaa_singh@yahoo.co.in
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - .gitignore
66
+ - .travis.yml
67
+ - Changelog.md
68
+ - Gemfile
69
+ - Gemfile.lock
70
+ - Rakefile
71
+ - Readme.md
72
+ - app/assets/javascripts/whiteorblack.js
73
+ - lib/whiteorblack.rb
74
+ - lib/whiteorblack/rails.rb
75
+ - lib/whiteorblack/version.rb
76
+ - whiteorblack-rails.gemspec
77
+ homepage: https://github.com/visual-search/visualsearch-rails
78
+ licenses:
79
+ - MIT
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project:
98
+ rubygems_version: 1.8.17
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: Gem for a deciding whether you need a balck font color or white !! :D
102
+ test_files: []