loadable_component 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in loadable_component.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Jari Bakken
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,24 @@
1
+ loadable_component
2
+ ===================
3
+
4
+ See also
5
+ --------
6
+
7
+ * http://code.google.com/p/selenium/wiki/LoadableComponent
8
+ * https://gist.github.com/904503
9
+
10
+ Note on Patches/Pull Requests
11
+ -----------------------------
12
+
13
+ * Fork the project.
14
+ * Make your feature addition or bug fix.
15
+ * Add tests for it. This is important so I don't break it in a
16
+ future version unintentionally.
17
+ * Commit, do not mess with rakefile, version, or history.
18
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
19
+ * Send me a pull request. Bonus points for topic branches.
20
+
21
+ Copyright
22
+ ---------
23
+
24
+ Copyright (c) 2011 Jari Bakken. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,38 @@
1
+ require "loadable_component/version"
2
+
3
+ #
4
+ # Read more about LoadableComponent here:
5
+ #
6
+ # http://code.google.com/p/selenium/wiki/LoadableComponent
7
+ #
8
+
9
+ class LoadableComponent
10
+
11
+ class UnableToLoadComponent < StandardError; end
12
+ class SubclassResponsibility < StandardError; end
13
+
14
+ def load
15
+ raise SubclassResponsibility, "should implement #load"
16
+ end
17
+
18
+ def loaded?
19
+ raise SubclassResponsibility, "should implement #loaded?"
20
+ end
21
+
22
+ def get
23
+ load unless loaded?
24
+
25
+ unless loaded?
26
+ raise UnableToLoadComponent, unable_to_load_message
27
+ end
28
+
29
+ self
30
+ end
31
+
32
+ private
33
+
34
+ def unable_to_load_message
35
+ "could not load #{self.class.name}"
36
+ end
37
+
38
+ end
@@ -0,0 +1,3 @@
1
+ class LoadableComponent
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "loadable_component/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "loadable_component"
7
+ s.version = LoadableComponent::VERSION
8
+ s.authors = ["Jari Bakken"]
9
+ s.email = ["jari.bakken@gmail.com"]
10
+ s.homepage = "http://github.com/jarib/loadable_component"
11
+ s.summary = %q{Ruby implementation of http://code.google.com/p/selenium/wiki/LoadableComponent}
12
+ s.description = %q{Ruby implementation of http://code.google.com/p/selenium/wiki/LoadableComponent}
13
+
14
+ s.rubyforge_project = "loadable_component"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ s.add_development_dependency "rake"
23
+ # s.add_runtime_dependency "rest-client"
24
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: loadable_component
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Jari Bakken
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-11-18 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ type: :development
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ prerelease: false
32
+ name: rake
33
+ version_requirements: *id001
34
+ description: Ruby implementation of http://code.google.com/p/selenium/wiki/LoadableComponent
35
+ email:
36
+ - jari.bakken@gmail.com
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - .gitignore
45
+ - Gemfile
46
+ - LICENSE
47
+ - README.md
48
+ - Rakefile
49
+ - lib/loadable_component.rb
50
+ - lib/loadable_component/version.rb
51
+ - loadable_component.gemspec
52
+ homepage: http://github.com/jarib/loadable_component
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ hash: 3
66
+ segments:
67
+ - 0
68
+ version: "0"
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ requirements: []
79
+
80
+ rubyforge_project: loadable_component
81
+ rubygems_version: 1.8.10
82
+ signing_key:
83
+ specification_version: 3
84
+ summary: Ruby implementation of http://code.google.com/p/selenium/wiki/LoadableComponent
85
+ test_files: []
86
+