Skip to content

Commit 15f5da5

Browse files
byrootjhawthorn
authored andcommitted
Fix inconsistency in module name
Sometimes `RapidJSON` was used, sometimes `Rapidjson`
1 parent 1857aea commit 15f5da5

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

ext/rapidjson/cext.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "rapidjson/prettywriter.h"
55
#include "rapidjson/error/en.h"
66

7-
static VALUE rb_mRapidjson;
7+
static VALUE rb_mRapidJSON;
88
static VALUE rb_eParseError;
99
static VALUE rb_eEncodeError;
1010

@@ -67,15 +67,15 @@ Init_rapidjson(void)
6767
id_to_s = rb_intern("to_s");
6868
id_to_json = rb_intern("to_json");
6969

70-
rb_mRapidjson = rb_define_module("RapidJSON");
71-
rb_define_module_function(rb_mRapidjson, "encode", encode, 1);
72-
rb_define_module_function(rb_mRapidjson, "pretty_encode", pretty_encode, 1);
73-
rb_define_module_function(rb_mRapidjson, "dump", encode, 1);
70+
rb_mRapidJSON = rb_define_module("RapidJSON");
71+
rb_define_module_function(rb_mRapidJSON, "encode", encode, 1);
72+
rb_define_module_function(rb_mRapidJSON, "pretty_encode", pretty_encode, 1);
73+
rb_define_module_function(rb_mRapidJSON, "dump", encode, 1);
7474

75-
rb_define_module_function(rb_mRapidjson, "parse", parse, 1);
76-
rb_define_module_function(rb_mRapidjson, "load", parse, 1);
77-
rb_define_module_function(rb_mRapidjson, "valid_json?", valid_json_p, 1);
75+
rb_define_module_function(rb_mRapidJSON, "parse", parse, 1);
76+
rb_define_module_function(rb_mRapidJSON, "load", parse, 1);
77+
rb_define_module_function(rb_mRapidJSON, "valid_json?", valid_json_p, 1);
7878

79-
rb_eParseError = rb_define_class_under(rb_mRapidjson, "ParseError", rb_eStandardError);
80-
rb_eEncodeError = rb_define_class_under(rb_mRapidjson, "EncodeError", rb_eStandardError);
79+
rb_eParseError = rb_define_class_under(rb_mRapidJSON, "ParseError", rb_eStandardError);
80+
rb_eEncodeError = rb_define_class_under(rb_mRapidJSON, "EncodeError", rb_eStandardError);
8181
}

lib/rapidjson.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_relative "rapidjson/version"
44
require_relative "rapidjson/rapidjson"
55

6-
module Rapidjson
6+
module RapidJSON
77
class Error < StandardError; end
88
# Your code goes here...
99
end

lib/rapidjson/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

3-
module Rapidjson
3+
module RapidJSON
44
VERSION = "0.1.1"
55
end

rapidjson.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require_relative "lib/rapidjson/version"
44

55
Gem::Specification.new do |spec|
66
spec.name = "rapidjson"
7-
spec.version = Rapidjson::VERSION
7+
spec.version = RapidJSON::VERSION
88
spec.authors = ["John Hawthorn"]
99
spec.email = ["[email protected]"]
1010

test/test_rapidjson.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
require "test_helper"
44

5-
class TestRapidjson < Minitest::Test
5+
class TestRapidJSON < Minitest::Test
66
def test_that_it_has_a_version_number
7-
refute_nil ::Rapidjson::VERSION
7+
refute_nil ::RapidJSON::VERSION
88
end
99
end

0 commit comments

Comments
 (0)