scala-bootstrapper 0.3.0 → 0.4.0

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -23,12 +23,20 @@ class String
23
23
  self[0].chr.downcase + camelize(self)[1..-1]
24
24
  end
25
25
  end
26
+ def underscore
27
+ self.gsub(/::/, '/').
28
+ gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
29
+ gsub(/([a-z\d])([A-Z])/,'\1_\2').
30
+ tr("-", "_").
31
+ downcase
32
+ end
26
33
  end
27
34
 
28
35
  def gsub_birds(haystack, name, namespace)
29
36
  haystack.
30
37
  gsub("BirdName", name).
31
38
  gsub("birdname", name.downcase).
39
+ gsub("bird_name", name.underscore).
32
40
  gsub("birdName", name.camelize).
33
41
  gsub("com.twitter", namespace).
34
42
  gsub("com/twitter", namespace.gsub(".", "/"))
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+ gem "thrift_client", "0.6"
3
+ gem "thrift", "0.5"
@@ -1,6 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
  $: << File.dirname(__FILE__) + "/../target/gen-rb"
3
+
3
4
  require "rubygems"
5
+ require "bundler/setup"
6
+
4
7
  require "thrift"
5
8
  require "thrift_client"
6
9
  require "bird_name_service"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{scala-bootstrapper}
8
- s.version = "0.3.0"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kyle Maxwell"]
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
27
27
  "bin/sbt",
28
28
  "bin/scala-bootstrapper",
29
29
  "lib/template/.gitignore",
30
+ "lib/template/Gemfile",
30
31
  "lib/template/bin/console.erb",
31
32
  "lib/template/config/development.scala.erb",
32
33
  "lib/template/config/production.scala.erb",
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
7
+ - 4
8
8
  - 0
9
- version: 0.3.0
9
+ version: 0.4.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kyle Maxwell
@@ -49,6 +49,7 @@ files:
49
49
  - bin/sbt
50
50
  - bin/scala-bootstrapper
51
51
  - lib/template/.gitignore
52
+ - lib/template/Gemfile
52
53
  - lib/template/bin/console.erb
53
54
  - lib/template/config/development.scala.erb
54
55
  - lib/template/config/production.scala.erb