Permalink
Browse files

Updating git-diff script, adding constants for abbreviated number min…

…/max, removing pry includes
  • Loading branch information...
1 parent 1b76e0a commit 2907707baddca64cd14f30a56b549d61de1d1155 Cameron Dutro committed Nov 15, 2012
View
@@ -8,7 +8,9 @@ excl = [
"resources/unicode_data",
].map { |pattern| "grep -v #{pattern}" }
-files = `git diff --diff-filter=ACMRTUXB --name-only master . | #{excl.join(" | ")}`.split("\n")
-`git diff master #{files.join(" ")} > /tmp/twitter-cldr-rb.diff`
-`git diff --diff-filter=D master . >> /tmp/twitter-cldr-rb.diff`
+base_branch = ENV["BRANCH"] || "master"
+
+files = `git diff --diff-filter=ACMRTUXB --name-only #{base_branch} . | #{excl.join(" | ")}`.split("\n")
+`git diff #{base_branch} #{files.join(" ")} > /tmp/twitter-cldr-rb.diff`
+`git diff --diff-filter=D #{base_branch} . >> /tmp/twitter-cldr-rb.diff`
exec "less /tmp/twitter-cldr-rb.diff"
@@ -6,6 +6,9 @@
module TwitterCldr
module Tokenizers
class NumberTokenizer < Base
+ ABBREVIATED_MIN_POWER = 3
+ ABBREVIATED_MAX_POWER = 14
+
VALID_TYPES = [:decimal, :percent, :currency, :short_decimal, :long_decimal]
TOKEN_SPLITTER_REGEX = /([^0*#,\.]*)([0#,\.]+)([^0*#,\.]*)$/
TOKEN_TYPE_REGEXES = {
@@ -4,8 +4,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
require 'spec_helper'
-require 'pry'
-require 'pry-nav'
include TwitterCldr::Formatters

0 comments on commit 2907707

Please sign in to comment.