lyre 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ #ignore the build directory
2
+ /pkg
3
+
4
+ #ignore any compiled gems
5
+ *.gem
6
+
7
+ #ignore swp files
8
+ *.swp
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.9.3@lyre --verbose
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lyre (0.0.0)
5
+ sinatra
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.1.3)
11
+ rack (1.5.2)
12
+ rack-protection (1.3.2)
13
+ rack
14
+ rake (10.0.3)
15
+ rspec (2.12.0)
16
+ rspec-core (~> 2.12.0)
17
+ rspec-expectations (~> 2.12.0)
18
+ rspec-mocks (~> 2.12.0)
19
+ rspec-core (2.12.2)
20
+ rspec-expectations (2.12.1)
21
+ diff-lcs (~> 1.1.3)
22
+ rspec-mocks (2.12.2)
23
+ sinatra (1.3.4)
24
+ rack (~> 1.4)
25
+ rack-protection (~> 1.3)
26
+ tilt (~> 1.3, >= 1.3.3)
27
+ tilt (1.3.3)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ lyre!
34
+ rake
35
+ rspec
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ require 'rspec/core/rake_task'
2
+ require 'bundler'
3
+
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ RSpec::Core::RakeTask.new do |t|
7
+ t.pattern = "spec/**/*_spec.rb"
8
+ t.rspec_opts = "--format progress"
9
+ end
10
+
11
+ desc "Default: build and run all specs"
12
+ task :default => [:spec]
13
+
14
+ desc "Clean build artifacts"
15
+ task :clean do
16
+ `rm *.gem`
17
+ end
@@ -0,0 +1,3 @@
1
+ module Lyre
2
+ VERSION = '0.0.0'
3
+ end
data/lib/lyre.rb ADDED
@@ -0,0 +1 @@
1
+ require 'lyre/version'
data/lyre.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+ require 'lyre/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'lyre'
6
+ s.version = Lyre::VERSION
7
+ s.authors = ['Sortfolio, Inc.']
8
+ s.email = ['dev@sortfolio.com']
9
+ s.homepage = ''
10
+ s.summary = 'Awesome mocks of external REST API dependencies'
11
+ s.description = 'Awesome mocks of external REST API dependencies'
12
+
13
+ s.required_ruby_version = ">= 1.9.2"
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ['lib']
19
+
20
+ s.add_dependency 'sinatra'
21
+
22
+ s.add_development_dependency 'rake'
23
+ s.add_development_dependency 'rspec'
24
+ end
@@ -0,0 +1,5 @@
1
+ require 'rspec'
2
+
3
+ PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')).freeze
4
+
5
+ Dir[File.join(PROJECT_ROOT, 'spec', 'support', '**', '*.rb')].each { |file| require(file) }
@@ -0,0 +1,23 @@
1
+ require 'net/http'
2
+
3
+ class FakeService
4
+
5
+ class << self
6
+ def endpoint
7
+ @endpoint || 'example.com'
8
+ end
9
+
10
+ def endpoint=(value)
11
+ @endpoint = value
12
+ end
13
+
14
+ def call_service
15
+ http = Net::HTTP.new(endpoint)
16
+ request = Net::HTTP::Get.new("/")
17
+ response = http.request(request)
18
+
19
+ response.body
20
+ end
21
+ end
22
+
23
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lyre
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Sortfolio, Inc.
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sinatra
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: Awesome mocks of external REST API dependencies
63
+ email:
64
+ - dev@sortfolio.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - .gitignore
70
+ - .rvmrc
71
+ - Gemfile
72
+ - Gemfile.lock
73
+ - Rakefile
74
+ - lib/lyre.rb
75
+ - lib/lyre/version.rb
76
+ - lyre.gemspec
77
+ - spec/spec_helper.rb
78
+ - spec/support/fake_service.rb
79
+ homepage: ''
80
+ licenses: []
81
+ post_install_message:
82
+ rdoc_options: []
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: 1.9.2
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 1.8.24
100
+ signing_key:
101
+ specification_version: 3
102
+ summary: Awesome mocks of external REST API dependencies
103
+ test_files:
104
+ - spec/spec_helper.rb
105
+ - spec/support/fake_service.rb