t6d-mensa 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -20,9 +20,20 @@ rescue LoadError
20
20
  end
21
21
 
22
22
  require 'spec/rake/spectask'
23
- Spec::Rake::SpecTask.new(:spec) do |spec|
24
- spec.libs << 'lib' << 'spec'
25
- spec.spec_files = FileList['spec/**/*_spec.rb']
23
+
24
+
25
+ rubies = Dir.glob('/opt/ruby/*').map do |dir|
26
+ next if !File.directory?(dir) || File.symlink?(dir)
27
+ dir.sub(/.*\/(.*)$/, '\1')
28
+ end
29
+ rubies.compact!
30
+
31
+ rubies.each do |ruby_version|
32
+ Spec::Rake::SpecTask.new(:spec) do |spec|
33
+ `chruby #{ruby_version}`
34
+ spec.libs << 'lib' << 'spec'
35
+ spec.spec_files = FileList['spec/**/*_spec.rb']
36
+ end
26
37
  end
27
38
 
28
39
  Spec::Rake::SpecTask.new(:rcov) do |spec|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
data/lib/ext/string.rb ADDED
@@ -0,0 +1,7 @@
1
+ if RUBY_VERSION <= '1.8.6'
2
+ class String
3
+ def lines
4
+ self.map
5
+ end
6
+ end
7
+ end
data/lib/mensa.rb CHANGED
@@ -4,9 +4,11 @@ require 'uri'
4
4
  require 'net/http'
5
5
  require 'iconv'
6
6
 
7
- require 'jcode' if RUBY_VERSION < '1.9'
7
+ if RUBY_VERSION < '1.9'
8
+ require 'jcode'
9
+ require 'rubygems'
10
+ end
8
11
 
9
- require 'rubygems'
10
12
  require 'nokogiri'
11
13
 
12
14
  require 'mensa/canteen'
@@ -15,6 +17,8 @@ require 'mensa/document'
15
17
  require 'mensa/exceptions'
16
18
  require 'mensa/fare'
17
19
 
20
+ require 'ext/string'
21
+
18
22
  module Mensa
19
23
  MENSA_DIR = File.join(File.dirname(__FILE__), '..')
20
24
  end
data/mensa.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{mensa}
5
- s.version = "0.1.3"
5
+ s.version = "0.1.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Konstantin Tennhard"]
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
  "fixtures/mensa-schofferstrase.html",
31
31
  "fixtures/mensa-stadtmitte.html",
32
32
  "fixtures/output.txt",
33
+ "lib/ext/string.rb",
33
34
  "lib/mensa.rb",
34
35
  "lib/mensa/canteen.rb",
35
36
  "lib/mensa/client.rb",
data/spec/spec_helper.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  # coding: utf-8
2
2
 
3
- require 'spec'
4
- require 'fakeweb'
5
-
6
3
  $LOAD_PATH.unshift(File.dirname(__FILE__))
7
4
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
8
5
 
9
6
  require 'mensa'
10
7
 
8
+ require 'spec'
9
+ require 'fakeweb'
10
+
11
11
  PROJECT_DIR = File.join(File.dirname(__FILE__), '..')
12
12
 
13
13
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t6d-mensa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Tennhard
@@ -47,6 +47,7 @@ files:
47
47
  - fixtures/mensa-schofferstrase.html
48
48
  - fixtures/mensa-stadtmitte.html
49
49
  - fixtures/output.txt
50
+ - lib/ext/string.rb
50
51
  - lib/mensa.rb
51
52
  - lib/mensa/canteen.rb
52
53
  - lib/mensa/client.rb