rspec_gem 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,3 +18,6 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
+ Run the all tests from directory "spec"
22
+
23
+ rake rspec_gem:rspec[spec/.]
data/Rakefile CHANGED
@@ -1 +1,2 @@
1
1
  require "bundler/gem_tasks"
2
+ require_relative "lib/rspec_gem"
@@ -1,3 +1,3 @@
1
1
  module RspecGem
2
- VERSION = "0.0.0"
2
+ VERSION = "0.0.1"
3
3
  end
data/lib/rspec_gem.rb CHANGED
@@ -1,5 +1,31 @@
1
+ # encoding: utf-8
1
2
  require "rspec_gem/version"
2
3
 
3
4
  module RspecGem
4
-
5
+
6
+ class << self
7
+
8
+ def config(path, name)
9
+ @path = path
10
+ @name_of_gem = name
11
+ end
12
+
13
+ def path
14
+ File.expand_path("../../", @path)
15
+ end
16
+
17
+ def name_of_gem
18
+ @name_of_gem
19
+ end
20
+
21
+ def require_rails_environment
22
+ require File.expand_path("../config/environment", Rails.root) if defined?(Rails)
23
+ end
24
+
25
+ end
26
+
27
+ config(__FILE__, "rspec_gem")
28
+
29
+ load File.expand_path("../tasks/rspec_gem.rake", __FILE__) if defined?(Rake)
30
+
5
31
  end
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+
3
+ require "logger"
4
+
5
+ namespace RspecGem.name_of_gem do
6
+
7
+ desc "testing gem #{RspecGem.name_of_gem}"
8
+ task :rspec, :arg do |key, element|
9
+ log = Logger.new(STDOUT)
10
+ log.info `rspec #{File.expand_path(element[:arg], RspecGem.path)}`
11
+ end
12
+
13
+ end
data/rspec_gem.gemspec CHANGED
@@ -6,6 +6,8 @@ require 'rspec_gem/version'
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = "rspec_gem"
8
8
  gem.version = RspecGem::VERSION
9
+ gem.platform = Gem::Platform::RUBY
10
+ gem.date = "2012-09-19"
9
11
  gem.authors = ["michal szyma"]
10
12
  gem.email = ["raglub.ruby@gmail.com"]
11
13
  gem.description = %q{Invoke the tests rspec from gems in application rails.}
@@ -13,7 +15,10 @@ Gem::Specification.new do |gem|
13
15
  gem.homepage = "https://github.com/raglub/rspec_gem"
14
16
 
15
17
  gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.test_files = gem.files.grep(%r{^(spec)/})
18
19
  gem.require_paths = ["lib"]
20
+
21
+ gem.add_development_dependency "rspec"
22
+ gem.add_dependency "logger", ">= 1.2.8"
23
+ gem.add_dependency "rake"
19
24
  end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rspec_gem'
4
+
5
+ RSpec.configuration.color = true
6
+
7
+ describe RspecGem do
8
+ it "rspec_gem" do
9
+ puts "rspec_gem"
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,56 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-18 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2012-09-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
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: logger
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 1.2.8
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.2.8
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
14
62
  description: Invoke the tests rspec from gems in application rails.
15
63
  email:
16
64
  - raglub.ruby@gmail.com
@@ -25,7 +73,9 @@ files:
25
73
  - Rakefile
26
74
  - lib/rspec_gem.rb
27
75
  - lib/rspec_gem/version.rb
76
+ - lib/tasks/rspec_gem.rake
28
77
  - rspec_gem.gemspec
78
+ - spec/rspec_gem_spec.rb
29
79
  homepage: https://github.com/raglub/rspec_gem
30
80
  licenses: []
31
81
  post_install_message:
@@ -50,4 +100,5 @@ rubygems_version: 1.8.24
50
100
  signing_key:
51
101
  specification_version: 3
52
102
  summary: Invoke the tests rspec from gems in application rails.
53
- test_files: []
103
+ test_files:
104
+ - spec/rspec_gem_spec.rb