Permalink
Browse files

Change name

  • Loading branch information...
1 parent fc4c108 commit e0c644e358860b2f2dc01efee33f1f12e6824a54 @tibastral tibastral committed Nov 9, 2012
View
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
-# Specify your gem's dependencies in vintner.gemspec
+# Specify your gem's dependencies in simplifyapi.gemspec
gemspec
View
@@ -1,20 +1,20 @@
-# Vintner
+# Simplifyapi
TODO: Write a gem description
## Installation
Add this line to your application's Gemfile:
- gem 'vintner'
+ gem 'simplifyapi'
And then execute:
$ bundle
Or install it yourself as:
- $ gem install vintner
+ $ gem install simplifyapi
## Usage
View
@@ -0,0 +1,10 @@
+require "simplifyapi/version"
+require "simplifyapi/property"
+require "simplifyapi/collection"
+require "simplifyapi/representation"
+require "simplifyapi/representer"
+require "simplifyapi/collection_representer"
+
+module Simplifyapi
+ # Your code goes here...
+end
@@ -1,4 +1,4 @@
-module Vintner
+module Simplifyapi
class Builder
include DSLMethods
@@ -1,4 +1,4 @@
-module Vintner
+module Simplifyapi
class Collection
def initialize name, representer, &block
@name = name
@@ -1,7 +1,7 @@
require 'active_support/concern'
require 'active_support/core_ext'
-module Vintner
+module Simplifyapi
module CollectionRepresenter
extend ::ActiveSupport::Concern
@@ -1,4 +1,4 @@
-module Vintner
+module Simplifyapi
module DSLMethods
def initialize &block
@block = block
@@ -1,4 +1,4 @@
-module Vintner
+module Simplifyapi
class Importer
include DSLMethods
@@ -1,4 +1,4 @@
-module Vintner
+module Simplifyapi
class Property
attr_reader :name, :getter, :setter
@@ -1,8 +1,8 @@
-require 'vintner/dsl_methods'
-require 'vintner/builder'
-require 'vintner/importer'
+require 'simplifyapi/dsl_methods'
+require 'simplifyapi/builder'
+require 'simplifyapi/importer'
-module Vintner
+module Simplifyapi
class Representation
def initialize &block
@builder = Builder.new &block
@@ -1,7 +1,7 @@
require 'active_support/concern'
require 'active_support/core_ext'
-module Vintner
+module Simplifyapi
module Representer
extend ::ActiveSupport::Concern
@@ -1,3 +1,3 @@
-module Vintner
+module Simplifyapi
VERSION = "0.0.1"
end
View
@@ -1,10 +0,0 @@
-require "vintner/version"
-require "vintner/property"
-require "vintner/collection"
-require "vintner/representation"
-require "vintner/representer"
-require "vintner/collection_representer"
-
-module Vintner
- # Your code goes here...
-end
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/vintner/version', __FILE__)
+require File.expand_path('../lib/simplifyapi/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["JH. Chabran"]
@@ -11,9 +11,9 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
- gem.name = "vintner"
+ gem.name = "simplifyapi"
gem.require_paths = ["lib"]
- gem.version = Vintner::VERSION
+ gem.version = Simplifyapi::VERSION
gem.add_dependency 'activesupport', '~> 3.2.6'
gem.add_dependency 'i18n'
@@ -1,10 +1,10 @@
require 'spec_helper'
-module Vintner
+module Simplifyapi
describe Representer do
it "should declare a simple property" do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title
end
@@ -14,7 +14,7 @@ class Dummy
it "should declare a property with a getter" do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -29,7 +29,7 @@ class Dummy
it "should declare a property with a setter" do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
set do |model, value|
@@ -44,7 +44,7 @@ class Dummy
describe "Representation" do
before :each do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -86,7 +86,7 @@ class Dummy
describe "Complex representation" do
before :each do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -145,7 +145,7 @@ class Dummy
@model = Struct.new(:formatted_title, :stuff).new("test", "stuff")
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -198,7 +198,7 @@ def stuff
end
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -229,7 +229,7 @@ class Dummy
describe "Nested collections" do
before :each do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -249,7 +249,7 @@ class Dummy
end
class NestedDummies
- include Vintner::Representer
+ include Simplifyapi::Representer
collection :users, Dummy do
get { |model| model.dummies }
@@ -289,7 +289,7 @@ class NestedDummies
describe "Standalone collections" do
before :each do
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :title do
get do |model|
@@ -309,7 +309,7 @@ class Dummy
end
class DummyCollection
- include Vintner::CollectionRepresenter
+ include Simplifyapi::CollectionRepresenter
representer Dummy
@@ -349,7 +349,7 @@ class DummyCollection
@another_klass = Struct.new(:bar)
class Dummy
- include Vintner::Representer
+ include Simplifyapi::Representer
property :foo
representation do |json|
@@ -360,7 +360,7 @@ class Dummy
end
class Another
- include Vintner::Representer
+ include Simplifyapi::Representer
property :bar
representation do |json|
@@ -371,7 +371,7 @@ class Another
end
class DummyCollection
- include Vintner::CollectionRepresenter
+ include Simplifyapi::CollectionRepresenter
representer Dummy
@@ -381,7 +381,7 @@ class DummyCollection
end
class AnotherCollection
- include Vintner::CollectionRepresenter
+ include Simplifyapi::CollectionRepresenter
representer Another
View
@@ -1,4 +1,4 @@
-require 'vintner'
+require 'simplifyapi'
RSpec.configure do |config|
end

0 comments on commit e0c644e

Please sign in to comment.