mattapayne-gistr 1.0.1 → 1.0.3
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/gistr.gemspec +2 -2
- data/{gistr.rb → lib/gistr.rb} +0 -0
- data/test/test_gistr.rb +23 -1
- metadata +2 -2
data/gistr.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#The GemSpec to build the gem
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'gistr'
|
4
|
-
s.version = '1.0.
|
4
|
+
s.version = '1.0.3'
|
5
5
|
s.date = "2009-04-18"
|
6
6
|
s.summary = "Ruby Gist View helper library."
|
7
7
|
s.description = %{A Ruby library that adds view helpers for embedding Gists in views.}
|
@@ -9,6 +9,6 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.author = "Matt Payne"
|
10
10
|
s.email = "matt@mattpayne.ca"
|
11
11
|
s.homepage = "http://mattpayne.ca"
|
12
|
-
s.files = ['README', 'gistr.gemspec', 'gistr.rb']
|
12
|
+
s.files = ['README', 'gistr.gemspec', 'lib/gistr.rb']
|
13
13
|
s.test_files = ['test/test_gistr.rb']
|
14
14
|
end
|
data/{gistr.rb → lib/gistr.rb}
RENAMED
File without changes
|
data/test/test_gistr.rb
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
local_path = File.dirname(__FILE__)
|
3
|
-
|
3
|
+
|
4
|
+
module ActionView
|
5
|
+
class Base
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class Sinatra
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def helpers(&block)
|
14
|
+
yield block.call(self)
|
15
|
+
end
|
16
|
+
|
17
|
+
require File.join(local_path, "..", "lib", "gistr")
|
4
18
|
|
5
19
|
class MyTestClass
|
6
20
|
include Gistr::ViewHelpers
|
@@ -31,4 +45,12 @@ class GistrTest < Test::Unit::TestCase
|
|
31
45
|
assert_equal("<script src=\"http://gist.github.com/12345.js\"></script>", result)
|
32
46
|
end
|
33
47
|
|
48
|
+
def test_it_should_include_itself_in_ActionView_if_defined
|
49
|
+
assert(ActionView::Base.included_modules.include?(Gistr::ViewHelpers))
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_it_should_include_itself_in_Sinatra_helpers_if_defined
|
53
|
+
assert(self.respond_to?(:gist))
|
54
|
+
end
|
55
|
+
|
34
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mattapayne-gistr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Payne
|
@@ -24,7 +24,7 @@ extra_rdoc_files: []
|
|
24
24
|
files:
|
25
25
|
- README
|
26
26
|
- gistr.gemspec
|
27
|
-
- gistr.rb
|
27
|
+
- lib/gistr.rb
|
28
28
|
has_rdoc: false
|
29
29
|
homepage: http://mattpayne.ca
|
30
30
|
post_install_message:
|