etapper 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  *.tmproj
2
+ *.gem
2
3
  pkg/**
3
4
  tmp/**
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{etapper}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stephen Eley"]
12
- s.date = %q{2010-01-21}
12
+ s.date = %q{2010-01-25}
13
13
  s.email = %q{seley@aarweb.org}
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -2,6 +2,6 @@ require 'english/style_orm'
2
2
 
3
3
  class String
4
4
  def symbolize
5
- self.snakecase.tr(' ','_').gsub(/[^\w_]/,'').to_sym
5
+ self.snakecase.tr(' ','_').gsub(/[^\w_]/,'').sub(/^(\d)/,'_\1').to_sym
6
6
  end
7
7
  end
@@ -4,6 +4,10 @@ describe "String" do
4
4
  it "can turn itself into a symbol" do
5
5
  "This Is a Test, Yo".symbolize.should == :this_is_a_test_yo
6
6
  end
7
+
8
+ it "does not start with digits (to ensure valid method names)" do
9
+ "47 Ronin".symbolize.should == :_47_ronin
10
+ end
7
11
  end
8
12
 
9
13
  describe "Symbol" do
@@ -12,6 +12,12 @@ describe "Defined Value" do
12
12
  d.fieldName.should == "Member Name"
13
13
  end
14
14
 
15
+ it "converts eTapestry field names to proper method names" do
16
+ e = Etapper::API::DefinedValue.new(1, 0, "990 DQs", "4310.0.5555", "12/31/2009", "4310.0.5555555")
17
+ d = Etapper::DefinedValue.new(e)
18
+ d.key.should == :_990_d_qs
19
+ end
20
+
15
21
  it "allows setting Display Type" do
16
22
  d = Etapper::DefinedValue.new(:foo => "bar", :display_type => :multi_select)
17
23
  d.displayType.should == 2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Eley
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-21 00:00:00 -05:00
12
+ date: 2010-01-25 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency