forked from rails-api/case_transform
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84750b0
commit 471e727
Showing
10 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# json_key_transform | ||
# key_transform | ||
Extraction of the key_transform abilities of ActiveModelSerializers | ||
|
||
## Install | ||
|
||
```ruby | ||
gem 'key_transform' | ||
``` | ||
|
||
or | ||
|
||
```ruby | ||
require 'key_transform' | ||
``` | ||
## Usage | ||
|
||
```ruby | ||
CaseTransform.camel_lower(value) | ||
``` | ||
|
||
### Transforms | ||
|
||
| | Description | | ||
| --- | --- | | ||
| camel | PascalCase | | ||
| camel_lower | camelCase | | ||
| dash | dash-case | | ||
| underscore | under_score | | ||
| unaltered | pass through | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,17 @@ | |
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
|
||
require 'json_key_transform/version' | ||
require 'case_transform/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'json_key_transform' | ||
s.version = JsonKeyTransform::VERSION | ||
s.name = 'case_transform' | ||
s.version = CaseTransform::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.license = 'MIT' | ||
s.authors = ['L. Preston Sego III'] | ||
s.email = '[email protected]' | ||
s.homepage = 'https://github.com/NullVoxPopuli/json_key_transform' | ||
s.summary = "JsonKeyTransform-#{JsonKeyTransform::VERSION}" | ||
s.homepage = 'https://github.com/NullVoxPopuli/case_transform' | ||
s.summary = "CaseTransform-#{CaseTransform::VERSION}" | ||
s.description = 'Extraction of the key_transform abilities of ActiveModelSerializers' | ||
|
||
s.files = Dir['CHANGELOG.md', 'LICENSE', 'README.md', 'lib/**/*'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/json_key_transform/version.rb → lib/case_transform/version.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# frozen_string_literal: true | ||
module JsonKeyTransform | ||
module CaseTransform | ||
VERSION = '0.1'.freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters