Skip to content

Commit

Permalink
Updating git-diff script, adding constants for abbreviated number min…
Browse files Browse the repository at this point in the history
…/max, removing pry includes
  • Loading branch information
Cameron Dutro committed Nov 15, 2012
1 parent 1b76e0a commit 2907707
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions git-diff
Expand Up @@ -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"
3 changes: 3 additions & 0 deletions lib/twitter_cldr/tokenizers/numbers/number_tokenizer.rb
Expand Up @@ -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 = {
Expand Down
Expand Up @@ -4,8 +4,6 @@
# http://www.apache.org/licenses/LICENSE-2.0

require 'spec_helper'
require 'pry'
require 'pry-nav'

include TwitterCldr::Formatters

Expand Down

0 comments on commit 2907707

Please sign in to comment.