Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Lookout protobuffy to ruby-protobuf/protobuf v3.6.9 #23

Open
wants to merge 374 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
374 commits
Select commit Hold shift + click to select a range
bcbe2df
Style/RedundantException
tamird Oct 15, 2014
2bb5f1f
Style/EmptyLineBetweenDefs
tamird Oct 15, 2014
4b1ec19
Style/ClassAndModuleChildren
tamird Oct 15, 2014
6a85590
Style/CollectionMethods
tamird Oct 15, 2014
51eac3a
Style/CommentAnnotation
tamird Oct 15, 2014
d6b33d7
Style/DeprecatedHashMethods
tamird Oct 15, 2014
855467b
Style/EachWithObject
tamird Oct 15, 2014
d83fb04
Style/EmptyLines
tamird Oct 15, 2014
90b393c
Style/EmptyLinesAroundAccessModifier
tamird Oct 15, 2014
ff67c4e
Style/EmptyLiteral
tamird Oct 15, 2014
c990afc
Style/IndentationConsistency
tamird Oct 15, 2014
d5aa15f
Style/IndentationWidth
tamird Oct 15, 2014
2dacbe1
Style/LeadingCommentSpace
tamird Oct 15, 2014
712b93b
Style/MethodDefParentheses
tamird Oct 15, 2014
4416cd0
Style/NonNilCheck
tamird Oct 15, 2014
8ba5921
Style/OpMethod
tamird Oct 15, 2014
b5f4059
Style/PercentLiteralDelimiters
tamird Oct 15, 2014
3bd24d5
Style/Proc
tamird Oct 15, 2014
c7a06bc
Style/RedundantReturn
tamird Oct 15, 2014
8275f87
Style/RedundantSelf
tamird Oct 15, 2014
797e863
Style/SelfAssignment
tamird Oct 15, 2014
2d7fa3b
Style/SpaceAfterColon
tamird Oct 15, 2014
0cdef2f
Style/Semicolon
tamird Oct 15, 2014
96e0298
Style/SingleLineMethods
tamird Oct 15, 2014
f85b7fb
Style/SpaceAfterComma
tamird Oct 15, 2014
b8fc83b
Style/SpaceAfterNot
tamird Oct 15, 2014
344d54c
Style/TrailingComma
tamird Oct 15, 2014
58ca57e
Style/SignalException
tamird Oct 15, 2014
b51ca10
Style/RaiseArgs
tamird Oct 15, 2014
ed29436
Style/IfUnlessModifier
tamird Oct 15, 2014
272e075
Style/PredicateName
tamird Oct 15, 2014
9e8dca0
Style/RescueModifier
tamird Oct 15, 2014
09e5f7a
Style/FileName
tamird Oct 15, 2014
eaf4a88
Style/Lambda
tamird Oct 15, 2014
e11737d
Style/SpaceInsideBrackets
tamird Oct 15, 2014
a5e6efc
Merge pull request #226 from tamird/more-rubocop
localshred Oct 27, 2014
6752474
Merge pull request #228 from zachmargolis/zachmargolis/inspect
localshred Oct 27, 2014
aa2daa2
`int` is not a protobuf primitive
tamird Oct 27, 2014
fb3fc32
Merge pull request #229 from tamird/fix-tests
localshred Oct 28, 2014
e8aa113
Merge branch '3-3-stable'
liveh2o Oct 29, 2014
b17aaae
Make the tests pass
tamird Nov 24, 2014
e7081e7
Update autogenerated RuboCop config
tamird Nov 24, 2014
1172fdd
Force exit after rpc_server does its thing
tamird Nov 24, 2014
0d0930b
Merge pull request #231 from tamird/fix-the-tests
liveh2o Nov 24, 2014
2310e59
Remove uses of class_eval
tamird Sep 30, 2014
d5b713b
add backtrace output to logger when SIGTRAP
abrandoned Nov 28, 2014
903c630
extract the socket availability check for zmq connector
abrandoned Nov 28, 2014
ef72415
set socket before begin block
abrandoned Nov 28, 2014
73f58e7
alpha the methods in zmq connector
abrandoned Nov 28, 2014
33d2800
cause tap is weird
abrandoned Nov 28, 2014
b5333fd
use any? instead of reduce
abrandoned Nov 28, 2014
dc863f8
use $INPUT_RECORD_SEPARATOR and alpha methods
abrandoned Nov 28, 2014
b48615d
elevate broker polling milliseconds to env var
abrandoned Nov 28, 2014
964ee36
check options before checking worker count
abrandoned Nov 28, 2014
8528015
set the server for logging/stats that is chosen in zmq host_live choice
abrandoned Nov 28, 2014
1e68d79
initialize the @stats in the initialize method and fix rubycop warnings
abrandoned Nov 30, 2014
1caaa6e
Test enum inspect display, and fix the failing test
Oct 28, 2014
afa32a9
DRY class methods
tamird Dec 1, 2014
c38ad93
interpolation -> `#to_s`
tamird Dec 1, 2014
4804730
Protobuf::Deprecation is now much thinner
tamird Dec 1, 2014
2f607ee
Style
tamird Dec 1, 2014
f96ab05
Silence deprecation warnings in tests
tamird Dec 1, 2014
9c61595
Add pry debugger gems
tamird Dec 1, 2014
db4fd43
Suppress more noisy test output
tamird Dec 2, 2014
8e4d0a6
Merge pull request #230 from seejohnrun/master
localshred Dec 2, 2014
604feaf
Merge pull request #232 from tamird/class_eval
localshred Dec 2, 2014
4e383bf
Disable RSpec monkey patching
tamird Dec 1, 2014
fd0315a
Remove old comment
tamird Dec 1, 2014
6e5de44
Style/StringLiteralsInInterpolation
tamird Nov 24, 2014
ff5a48f
Style/MultilineOperationIndentation
tamird Nov 24, 2014
ddf7e0a
Style/EmptyLinesAroundMethodBody
tamird Nov 24, 2014
335e2ab
Style/Next
tamird Dec 1, 2014
e2b50d6
Style/HashSyntax
tamird Dec 1, 2014
fd8b03b
Style/GuardClause
tamird Dec 1, 2014
0675eb4
Remove spurious `begin`
tamird Dec 1, 2014
d079179
Remove unused module
tamird Dec 2, 2014
577db2d
Clarify that this is a monkeypatch
tamird Dec 2, 2014
88f73d9
Fix top-level constant warning
tamird Dec 2, 2014
70efd5e
Style
tamird Dec 2, 2014
98681ad
Stricter params parsing
tamird Dec 2, 2014
17ce496
Consistent log signatures
tamird Dec 2, 2014
ead3731
Randomize ports
tamird Dec 2, 2014
0095cd6
Fix the benchmarks
tamird Dec 2, 2014
37119ca
Other rubies need pry too
tamird Dec 2, 2014
4cbb1f7
Remove useless ivars
tamird Dec 2, 2014
76b4aac
Specs pass under JRuby now!
tamird Dec 2, 2014
55e9f56
Merge pull request #234 from tamird/rubocop-stuff
localshred Dec 2, 2014
face0bc
merge conf in zmq/server with options reorder
abrandoned Dec 3, 2014
9a46d80
don't memoize the @stats on a client
abrandoned Dec 3, 2014
4bd3ae8
make rubocop happy
abrandoned Dec 3, 2014
ad5fef9
Merge pull request #233 from localshred/abrandoned/thread_backtraces
abrandoned Dec 4, 2014
f0023e5
bump to 3.4.0
abrandoned Dec 4, 2014
fb70f1f
Start using svg in readme
Dec 5, 2014
7e05239
Merge pull request #237 from igas/svg
liveh2o Dec 5, 2014
c1055b4
reset the zmq socket inside the loop block to prevent infinite loop when
abrandoned Dec 9, 2014
34ce924
bump to 3.4.1
abrandoned Dec 9, 2014
5d6df9d
Fix deprecation warning logic
tamird Dec 2, 2014
d4d414d
Refresh RuboCop config
tamird Dec 23, 2014
5be7e59
Restore Rails 3.2 compatibility
tamird Dec 18, 2014
8fe272d
Merge pull request #241 from tamird/rails-3.2-compat
localshred Dec 29, 2014
09f2193
Support for Foo::SomeMessage.decode_from(stream)
bdferris Jan 6, 2015
a7c8203
Merge pull request #242 from bdferris/master
localshred Jan 6, 2015
b21661b
make snd and rcv timeout on check avail actually work with env vars
abrandoned Jan 16, 2015
cd3964c
catch and report if error in broker thread
abrandoned Jan 16, 2015
10bcc3b
restart context and join broker thread if broker dies
abrandoned Jan 16, 2015
b9fb942
disable Metrics/ClassLength in rubocop
abrandoned Jan 16, 2015
c0257ec
Merge pull request #244 from localshred/abrandoned/broker_probs
abrandoned Jan 17, 2015
9eb9520
allow Protobuf::Message based classes to be inherited
skippy Feb 2, 2015
96fe1ba
Merge pull request #247 from skippy/fix-class-inheritance
localshred Feb 18, 2015
c3cb5f9
Bump version 3.4.4
localshred Feb 18, 2015
bf3729b
Trying to get rubocop to shut the fuck up
localshred Feb 18, 2015
65cc475
Again, rubocop. I hate it
localshred Feb 18, 2015
2ea42e8
Add omniref doc badge
localshred Feb 19, 2015
12aa393
Allow the Message to be constructed with a block.
filterfish Feb 26, 2015
216fe1f
Remove unused variable.
filterfish Feb 26, 2015
6cd6849
don't downcast when assigning to a field_array
skippy Mar 4, 2015
f4ade20
Update `protobuf` to 2.6.1 and simplify the install
tamird Jan 27, 2015
06a66fb
Test against protobuf 3
tamird Mar 16, 2015
74f1e39
Adds support to specify integer and bool proto fields as string.
Mar 30, 2015
3321da5
restart service listener if it dies
abrandoned Apr 7, 2015
37d3ed9
use guard clause and make the cops happy
abrandoned Apr 7, 2015
f572eff
Fix unhandled error in trap signal handler
brianstien Apr 8, 2015
ac04930
Merge pull request #250 from filterfish/master
abrandoned Apr 14, 2015
7947660
Merge pull request #254 from localshred/abrandoned/restart_service_li…
abrandoned Apr 14, 2015
26487c9
Merge pull request #255 from brianstien/fix_trap_signal
abrandoned Apr 14, 2015
0077acd
clean up block syntax
abrandoned Apr 14, 2015
e20c58e
Merge branch 'master' of github.com:localshred/protobuf
abrandoned Apr 14, 2015
bf60348
Merge pull request #252 from skippy/fix-downcasting
abrandoned Apr 14, 2015
83f599e
keep check to to_hash in message_field as it is a valid use-case
abrandoned Apr 14, 2015
df97317
Merge pull request #253 from hrsht/support_string_for_integers_and_bools
abrandoned Apr 14, 2015
b308edd
Merge pull request #245 from tamird/simplify-protobuf-install
abrandoned Apr 14, 2015
474897b
bump to 3.5.0
abrandoned Apr 14, 2015
a2e448e
Move input file expansion into Ruby
BBonifield Apr 23, 2015
329ac77
Fix wording around stable branches
localshred Apr 24, 2015
e6b9b1a
Merge pull request #258 from ello/bb-jt-compiler-globing
localshred Apr 30, 2015
d4bb257
Move symbolize_keys to the constructors of socket and zmq runners
film42 Jul 1, 2015
bd0084f
Require active_support/core_ext/class to use subclasses in Rpc::Service
film42 Jul 1, 2015
2919413
Force cli to symbolize keys so mocked constructor tests pass
film42 Jul 1, 2015
23e1a18
Update readme to point at correct travis project
film42 Jul 1, 2015
bf9b027
a newer rubocop was released and this updates the code to stay inline…
abrandoned Jul 1, 2015
a5b69ce
Thread can be sleeping under MRI, fix by using alive?
film42 Jul 2, 2015
71fd6ae
move inherited hook to ClassMethods
abrandoned Jul 2, 2015
bc20ab3
Merge pull request #261 from ruby-protobuf/abrandoned/fixing_new_rubocop
abrandoned Jul 2, 2015
ac3ddf3
Merge pull request #262 from film42/gt/mri_thread_bug
abrandoned Jul 2, 2015
8668b7b
Merge pull request #260 from film42/gt/fix_cli_options_and_zmq_server
abrandoned Jul 2, 2015
b5c07d1
bump to 3.5.1
abrandoned Jul 2, 2015
580efd6
add changes for 3.5.1
abrandoned Jul 2, 2015
095e719
Optimized valid_tag?, enums_for_tag and enums_for_tags
Sep 25, 2015
a08db9d
Updated rubocop_todo.yml
Sep 25, 2015
86657d8
Merge pull request #264 from zanker/zanker/optimize-enums
abrandoned Sep 25, 2015
f04d670
bump to 3.5.2
abrandoned Sep 25, 2015
5bac686
Optimized get_extension_field and get_field calls
Sep 25, 2015
b19158b
Merge pull request #267 from zanker/zanker/optimize-get-field
abrandoned Sep 27, 2015
e44e4ce
bump to 3.5.3
abrandoned Sep 27, 2015
654d194
Run tests against MRI 2.2
Sep 28, 2015
7f68087
Optimized varint decoding when varint is available
Sep 28, 2015
620a937
Ensure ActiveSupport::Deprecation doesn't look for a caller when we h…
film42 Sep 28, 2015
04e9eb5
Merge branch 'master' into gt/speedy_deprecations
film42 Sep 28, 2015
d803c96
Refactor deprecation caller trace to not call super
film42 Sep 28, 2015
83a15a6
Merge pull request #271 from ruby-protobuf/gt/speedy_deprecations
abrandoned Sep 28, 2015
01002f7
bump to 3.5.4
abrandoned Sep 28, 2015
378e610
Merge pull request #270 from zanker/zanker/travis-22
abrandoned Sep 28, 2015
2e0081f
resolve rubocop issues
mmmries Sep 25, 2015
86ef907
peg the rubocop version, use keyword version of EndAlignment
mmmries Sep 29, 2015
fb26609
remove EndAlignment from the TODO list
mmmries Sep 29, 2015
709fee0
Merge pull request #266 from ruby-protobuf/rubocop_errors
abrandoned Sep 29, 2015
21d938e
Merge pull request #269 from zanker/zanker/varint
abrandoned Oct 1, 2015
07b2986
bump to 3.5.5
abrandoned Oct 1, 2015
3addd60
Deprecate gc_pause_request with a plan to remove this in 4.0
film42 Oct 28, 2015
e9f9a30
Ensure the ping port is timed out after a reasonable amount of time
film42 Jan 17, 2016
c332f18
Allow Message#each_field to return an enumerator
RKushnir Jan 20, 2016
63f46f4
Ensure bundler is at the latest version to make travis pass
film42 Jan 20, 2016
49aa220
hostname can be different than ruby's gethostname
film42 Jan 21, 2016
deb6772
fix raise_error rspec warnings
nerdrew Jan 26, 2016
a7016ab
fix spec failure with PB_NO_TAG_WARNINGS=1
nerdrew Jan 27, 2016
39224be
consolidate test protos to spec/support/protos
nerdrew Jan 27, 2016
008dd9a
add missing deprecation require
nerdrew Jan 27, 2016
7830b4e
only fetch value once on serialization and cache the varint encoding …
abrandoned Feb 1, 2016
797b522
Merge pull request #273 from ruby-protobuf/gt/remove_gc_stuff
film42 Feb 1, 2016
b4ff74b
Update changelog for last few releases
film42 Feb 1, 2016
6b3e2cd
Merge branch 'master' of https://github.com/ruby-protobuf/protobuf
film42 Feb 1, 2016
ee9db02
Merge pull request #279 from ruby-protobuf/gt/fix_travis
abrandoned Feb 1, 2016
fc44d8b
Merge branch 'master' into gt/timeout_ping_port
abrandoned Feb 1, 2016
00bc4a8
Merge pull request #277 from ruby-protobuf/gt/timeout_ping_port
abrandoned Feb 1, 2016
707a1f9
Merge pull request #284 from nerdrew/add-missing-deprecation-require
abrandoned Feb 1, 2016
d8fce01
Merge pull request #281 from nerdrew/fix-rspec-warnings
abrandoned Feb 1, 2016
bd40135
Merge pull request #278 from RKushnir/patch-1
abrandoned Feb 1, 2016
de62238
Merge branch 'master' into abrandoned/cache_varint_encoding
abrandoned Feb 1, 2016
312f4bd
Merge pull request #282 from nerdrew/fix-pb-no-tag-warnings-spec-poll…
abrandoned Feb 1, 2016
9d84055
Merge pull request #283 from nerdrew/refresh-unittest-protos-from-ups…
abrandoned Feb 1, 2016
a28ca82
clean up ordered require of SUPPORT_PATH
abrandoned Feb 1, 2016
b6b7db6
Merge pull request #286 from ruby-protobuf/abrandoned/cache_varint_en…
abrandoned Feb 1, 2016
b1ea86d
bump to 3.6.0
abrandoned Feb 1, 2016
e72d098
rubocop: exclude generated proto code
nerdrew Feb 1, 2016
3b7bf97
Fix for new ping port check
film42 Feb 1, 2016
d004585
Merge pull request #289 from ruby-protobuf/gt/return_socket
abrandoned Feb 1, 2016
d34849e
bump to 3.6.1
abrandoned Feb 1, 2016
6d52c29
Merge pull request #287 from nerdrew/nerdrew/rubocop-exclude-generate…
film42 Feb 1, 2016
7ee47ad
update README links localshred => ruby-protobuf
nerdrew Feb 1, 2016
09a085e
Merge pull request #288 from nerdrew/nerdrew/update-readme-links
abrandoned Feb 3, 2016
6209f04
fix test failures when running with --order random
nerdrew Feb 3, 2016
c4cc337
Merge pull request #291 from nerdrew/nerdrew/random-order-spec-fixes
abrandoned Feb 3, 2016
b498361
bump to 3.6.2
abrandoned Feb 3, 2016
c5727c0
reduce encoder to class method as object instantiation here (#new) wa…
abrandoned Feb 3, 2016
05aa775
create strings as combination of key size and serialized data as << i…
abrandoned Feb 3, 2016
7425971
unused field_name_store
abrandoned Feb 3, 2016
036967c
copy type; should encode val for repeated fields
abrandoned Feb 3, 2016
7b9ab5e
move boolean strings to constants and not checking 2nd case
abrandoned Feb 3, 2016
b8188c6
remove some stylistic "then" and do not need to explicitly return false
abrandoned Feb 3, 2016
445fe85
Merge pull request #292 from ruby-protobuf/abrandoned/serialization_e…
abrandoned Feb 4, 2016
6c9c8e3
bump to 3.6.3
abrandoned Feb 4, 2016
cf5dcfc
Add memoization to Serialization#encode
Feb 5, 2016
3555789
Add @memoized_encoded to setter in message_field.rb
Feb 5, 2016
f4c2fd6
Add @memoized_encoded to setter in enum_field.rb
Feb 5, 2016
7b53903
Set @memoized_encoded to eq nil in setter in base_field.rb
Feb 5, 2016
80864b9
Set @memoized_encoded to eq nil in setter in bytes_field.rb
Feb 5, 2016
20acff7
Add attr_accessor for memoized_encoded
Feb 5, 2016
09f67eb
Add memoized_encoded attr_accessor to Message.rb
Feb 5, 2016
0602cbf
Add specs for Message memoization
Feb 5, 2016
384071a
Yield to block instead of calling block.call in #decode_each_field
Feb 5, 2016
7ac9207
Replace @memoized_encoded with @encode
Feb 5, 2016
50cf599
Remove attr_accessor for memoized_encoded
Feb 5, 2016
2f8b1fe
Change @memoized_encoded to @encode
Feb 5, 2016
f8228de
Merge pull request #293 from vintagepenguin/dj/memoize-on-encode
abrandoned Feb 6, 2016
86cec14
fix rubocop
abrandoned Feb 6, 2016
c13c5fa
already loading field on define and should not need to calcualte the …
abrandoned Feb 6, 2016
08eeded
order case calls on probability string > fixed
abrandoned Feb 6, 2016
49af352
keepin the cops happy
abrandoned Feb 6, 2016
26898ae
a few fasterer recommendations
abrandoned Feb 6, 2016
aa2b15e
Merge pull request #295 from ruby-protobuf/abrandoned/cache_tag_encod…
abrandoned Feb 6, 2016
fe00c64
bump to 3.6.4
abrandoned Feb 6, 2016
39fd8ed
compress decoder to single method; only check nil? once on serializat…
abrandoned Feb 7, 2016
3d4ed9b
remove __send__ of method to decoder and optimize to optional fields
abrandoned Feb 7, 2016
f4bc6eb
Merge pull request #296 from ruby-protobuf/bdewitt/decode_opt
abrandoned Feb 7, 2016
a91da39
bump to 3.6.5
abrandoned Feb 7, 2016
dad7b00
Fix #define_getter method
akihiro17 Feb 8, 2016
a775963
Merge pull request #299 from akihiro17/fix-getter-method
film42 Feb 8, 2016
79fd485
Pull bool getter edge case into BoolField class
film42 Feb 8, 2016
099ffe4
Merge pull request #300 from ruby-protobuf/gt/bool_specific
film42 Feb 8, 2016
2970c0d
Bump version to 3.6.6
film42 Feb 8, 2016
ad4d852
Remove memoization on encode
liveh2o Feb 18, 2016
45a2fb1
Merge pull request #305 from ruby-protobuf/ah/revert_memoize_on_encode
liveh2o Feb 19, 2016
dee8a9d
Bump version to 3.6.7
liveh2o Feb 19, 2016
ddac25d
Allow user defined service directories
quixoten May 12, 2016
f75d916
Merge pull request #324 from quixoten/nobroadcast
film42 May 20, 2016
573df77
Bump version to 3.6.8
film42 May 20, 2016
ebf7d34
bump version to 3.6.9 because 3.6.8 is a yanked version
film42 May 20, 2016
7cddb61
Merge Lookout changes to upstream
atinm Sep 16, 2016
730e2c3
Removed versions of ruby we don't support
atinm Sep 16, 2016
be96b4c
Force install bundler 1.12.5
atinm Sep 16, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
inherit_from: .rubocop_todo.yml

Lint/EndAlignment:
AlignWith: keyword

Lint/Loop:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Style/CaseIndentation:
IndentWhenRelativeTo: end

Style/ClassAndModuleChildren:
Exclude:
- '**/*.pb.rb'

Style/ClassAndModuleCamelCase:
Exclude:
- '**/*.pb.rb'

Style/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true

Style/EmptyLines:
Exclude:
- '**/*.pb.rb'

Style/FileName:
Exclude:
- '**/protoc-gen-ruby*'

Style/GuardClause:
MinBodyLength: 4

Style/HashSyntax:
EnforcedStyle: hash_rockets

Style/IndentHash:
EnforcedStyle: consistent

Style/Semicolon:
AllowAsExpressionSeparator: true

Style/TrailingBlankLines:
Exclude:
- '**/*.pb.rb'

Style/TrailingComma:
EnforcedStyleForMultiline: comma

Style/TrivialAccessors:
AllowDSLWriters: true
AllowPredicates: true
139 changes: 139 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2015-09-25 12:31:31 -0700 using RuboCop version 0.34.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 31
Metrics/AbcSize:
Max: 59

# Offense count: 1
Metrics/BlockNesting:
Max: 5

# Offense count: 6
Metrics/CyclomaticComplexity:
Max: 10

# Offense count: 493
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 196

# Offense count: 44
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 38

# Offense count: 2
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 6

# Offense count: 6
Metrics/PerceivedComplexity:
Max: 11

# Offense count: 1
# Cop supports --auto-correct.
Performance/StringReplacement:
Exclude:
- 'lib/protobuf/rpc/buffer.rb'

# Offense count: 127
# Configuration parameters: Exclude.
Style/Documentation:
Enabled: false

# Offense count: 12
Style/DoubleNegation:
Exclude:
- 'lib/protobuf.rb'
- 'lib/protobuf/cli.rb'
- 'lib/protobuf/rpc/connectors/zmq.rb'
- 'lib/protobuf/rpc/servers/zmq/broker.rb'
- 'lib/protobuf/rpc/servers/zmq/server.rb'
- 'lib/protobuf/rpc/servers/zmq/worker.rb'
- 'lib/protobuf/rpc/service_directory.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/EmptyElse:
Exclude:
- 'lib/protobuf/enum.rb'
- 'lib/protobuf/message/fields.rb'

# Offense count: 77
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/EmptyLinesAroundBlockBody:
Enabled: false

# Offense count: 90
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/EmptyLinesAroundClassBody:
Enabled: false

# Offense count: 50
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/EmptyLinesAroundModuleBody:
Enabled: false

# Offense count: 2
Style/IndentationWidth:
Exclude:
- 'protobuf.gemspec'
- 'lib/protobuf/cli.rb'

# Offense count: 3
Style/ElseAlignment:
Exclude:
- 'protobuf.gemspec'
- 'lib/protobuf/cli.rb'

# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/ExtraSpacing:
Exclude:
- 'lib/protobuf/rpc/connectors/common.rb'
- 'lib/protobuf/rpc/connectors/socket.rb'
- 'lib/protobuf/rpc/connectors/zmq.rb'
- 'lib/protobuf/rpc/servers/socket/server.rb'
- 'spec/lib/protobuf/rpc/service_directory_spec.rb'

# Offense count: 46
# Cop supports --auto-correct.
Style/NumericLiterals:
MinDigits: 21

# Offense count: 473
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/StringLiterals:
Enabled: false

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
Style/SymbolProc:
Exclude:
- 'lib/protobuf/generators/printable.rb'
- 'lib/protobuf/rpc/servers/socket/server.rb'
- 'spec/encoding/all_types_spec.rb'
- 'spec/encoding/extreme_values_spec.rb'
- 'spec/functional/socket_server_spec.rb'
- 'spec/functional/zmq_server_spec.rb'
- 'spec/lib/protobuf/rpc/servers/socket_server_spec.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: WordRegex.
Style/WordArray:
MinSize: 2
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
language: ruby
rvm:
- 1.9.3
- 2.3.1
- 1.9.3
- 2.3.1
- jruby
env:
- PROTOBUF_VERSION=2.6.1
- PROTOBUF_VERSION=3.0.0-alpha-2
matrix:
allow_failures:
- env: PROTOBUF_VERSION=3.0.0-alpha-2
before_install:
- gem install bundler
- gem install bundler -v 1.12.5
script: NO_COMPILE_TEST_PROTOS=1 bundle _1.12.5_ exec rake spec/lib
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/51a956bcd2b1854d6756
- https://webhooks.gitter.im/e/51a956bcd2b1854d6756
on_success: change
on_failure: always
on_start: false
Expand Down
26 changes: 26 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Stable (3.x)

3.6.9
--------
- Make protobuf serivce directory pluggable.

3.5.5
--------
- Add native Varint for MRI.

3.5.4
--------
- Ensures ActiveSupport::Deprecation does not get a stack trace when deprecations are disabled.

3.5.3
--------
- Optimized get_extension_field and get_field calls.

3.5.2
--------
- Optimized valid_tag?, enums_for_tag and enums_for_tags

3.5.1
--------
- Adds compatibility for Rails 4.2+ as CLI options were broken
- Fixes bug with MRI and "dead" thread in zmq broker
- Fixes Rubocop compatability with new version

3.2.0
--------

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ your code merged.

1. Use GitHub Issues or Pull Requests over sending an email. It's much easier for me to keep track of your issue through GitHub.
2. For __compiler issues__, please provide both a gist for the __source definition(s)__ as well as the __generated output__ (if any).
3. For __existing issues or functionality__, please use __`2-8-stable`__ as the base branch for the pull request. This helps us maintain a stable gem release strategy. All commits merged to `2-8-stable` will also be merged down to `master`.
3. For __existing issues or functionality__, please use the latest stable branch (currently __`3-5-stable`__) as the base branch for the pull request. This helps us maintain a stable gem release strategy. All commits merged to stable will also be merged down to `master`.
4. For __new functionality__, please use __`master`__ as the base branch for the pull request. The `master` branch is used to stage all "next iteration" work.
5. Be patient with me as I work on your issue.

Expand Down
26 changes: 17 additions & 9 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
The MIT License (MIT)

Copyright (C) 2004 Sam Hocevar <[email protected]>
Copyright (c) 2014 BJ Neilsen

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

0. You just DO WHAT THE FUCK YOU WANT TO.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

(the JSON slayer)

[![Gem Version](https://badge.fury.io/rb/protobuf.png)](http://badge.fury.io/rb/protobuf)
[![Build Status](https://secure.travis-ci.org/localshred/protobuf.png?branch=master)](https://travis-ci.org/localshred/protobuf)
[![Gitter chat](https://badges.gitter.im/localshred/protobuf.png)](https://gitter.im/localshred/protobuf)
[![Gem Version](https://badge.fury.io/rb/protobuf.svg)](http://badge.fury.io/rb/protobuf)
[![Build Status](https://secure.travis-ci.org/ruby-protobuf/protobuf.svg?branch=master)](https://travis-ci.org/ruby-protobuf/protobuf)
[![Gitter chat](https://badges.gitter.im/ruby-protobuf/protobuf.svg)](https://gitter.im/ruby-protobuf/protobuf)
[![protobuf API Documentation](https://www.omniref.com/ruby/gems/protobuf.png)](https://www.omniref.com/ruby/gems/protobuf)

Protobuffy is an implementation of [Google's protocol buffers][google-pb] in
ruby, version 2.5.0 is currently supported.
Expand Down Expand Up @@ -47,12 +48,12 @@ Alternatively, start the server as a Rack app using a `rackup` and a standard `c
See recent changes in the [release notes][] or the [changelog][].

[google-pb]: http://code.google.com/p/protobuf "Google Protocol Buffers"
[wiki]: https://github.com/localshred/protobuf/wiki "Wiki home page"
[Installation Guide]: https://github.com/localshred/protobuf/wiki/Installation "Installation guide"
[compiling definitions]: https://github.com/localshred/protobuf/wiki/Compiling-Definitions "Compiling guide"
[object APIs]: https://github.com/localshred/protobuf/wiki/Messages-&-Enums "Message & Enum object APIs guide"
[services]: https://github.com/localshred/protobuf/wiki/Services "Services object API guide"
[clients]: https://github.com/localshred/protobuf/wiki/Clients "Client object API guide"
[API roadmap]: https://github.com/localshred/protobuf/wiki/API-Roadmap "API Roadmap guide"
[release notes]: https://github.com/localshred/protobuf/releases "Release notes"
[changelog]: https://github.com/localshred/protobuf/blob/master/CHANGES.md "CHANGES.md"
[wiki]: https://github.com/ruby-protobuf/protobuf/wiki "Wiki home page"
[Installation Guide]: https://github.com/ruby-protobuf/protobuf/wiki/Installation "Installation guide"
[compiling definitions]: https://github.com/ruby-protobuf/protobuf/wiki/Compiling-Definitions "Compiling guide"
[object APIs]: https://github.com/ruby-protobuf/protobuf/wiki/Messages-&-Enums "Message & Enum object APIs guide"
[services]: https://github.com/ruby-protobuf/protobuf/wiki/Services "Services object API guide"
[clients]: https://github.com/ruby-protobuf/protobuf/wiki/Clients "Client object API guide"
[API roadmap]: https://github.com/ruby-protobuf/protobuf/wiki/API-Roadmap "API Roadmap guide"
[release notes]: https://github.com/ruby-protobuf/protobuf/releases "Release notes"
[changelog]: https://github.com/ruby-protobuf/protobuf/blob/master/CHANGES.md "CHANGES.md"
25 changes: 14 additions & 11 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$: << ::File.expand_path('../', __FILE__)
$: << ::File.expand_path('../spec', __FILE__)
$LOAD_PATH << ::File.expand_path('../', __FILE__)
$LOAD_PATH << ::File.expand_path('../spec', __FILE__)

require 'fileutils'
require 'rubygems'
Expand All @@ -8,31 +8,34 @@ require 'bundler/gem_tasks'
require 'benchmark/tasks'

require 'rspec/core/rake_task'

desc 'Default: run specs.'
task :default => :spec
require 'rubocop/rake_task'

RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new

task :default => ['compile:spec', 'compile:rpc', :spec, :rubocop]

desc 'Run specs'
namespace :compile do

desc 'Compile spec protos in spec/supprt/ directory'
task :spec do |task, args|
task :spec do
proto_path = ::File.expand_path('../spec/support/', __FILE__)
cmd = %Q{protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{proto_path} -I #{proto_path} #{File.join(proto_path, '**', '*.proto')}}
proto_files = Dir[File.join(proto_path, '**', '*.proto')]
cmd = %(protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{proto_path} -I #{proto_path} #{proto_files.join(' ')})

puts cmd
exec(cmd)
system(cmd)
end

desc 'Compile rpc protos in protos/ directory'
task :rpc do |task, args|
task :rpc do
proto_path = ::File.expand_path('../proto', __FILE__)
proto_files = Dir[File.join(proto_path, '**', '*.proto')]
output_dir = ::File.expand_path('../tmp/rpc', __FILE__)
::FileUtils.mkdir_p(output_dir)

cmd = %Q{protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{output_dir} -I #{proto_path} #{File.join(proto_path, '**', '*.proto')}}
cmd = %(protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{output_dir} -I #{proto_path} #{proto_files.join(' ')})

puts cmd
system(cmd)
Expand All @@ -41,7 +44,7 @@ namespace :compile do
'tmp/rpc/dynamic_discovery.pb.rb' => 'lib/protobuf/rpc',
'tmp/rpc/rpc.pb.rb' => 'lib/protobuf/rpc',
'tmp/rpc/google/protobuf/descriptor.pb.rb' => 'lib/protobuf/descriptors/google/protobuf',
'tmp/rpc/google/protobuf/compiler/plugin.pb.rb' => 'lib/protobuf/descriptors/google/protobuf/compiler'
'tmp/rpc/google/protobuf/compiler/plugin.pb.rb' => 'lib/protobuf/descriptors/google/protobuf/compiler',
}

files.each_pair do |source_file, destination_dir|
Expand Down
1 change: 0 additions & 1 deletion bin/protoc-gen-ruby
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ request_bytes = STDIN.read
code_generator = ::Protobuf::CodeGenerator.new(request_bytes)
response_bytes = code_generator.response_bytes
STDOUT.print(response_bytes)

Loading