Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Mar 21, 2017
2 parents 3a17b3f + d2ed537 commit 7ebdf57
Show file tree
Hide file tree
Showing 21 changed files with 124 additions and 461 deletions.
3 changes: 3 additions & 0 deletions .module.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
project.name=cbi18n
project.version=1.3.2
module.name=cbi18n
92 changes: 69 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
language: java

notifications:
slack:
secure: FIHlTn/YO7Wgumm1uIqmoEsqjQA7fV0AE94Rjc5yKzM3AquQa8HicgDVVk0d2GrKRnl0xt3j4ZJV//VJyIjlCd/QVKuj48R2ChjEY2im3+99HFPafCUI5/S2uyowKU6mJTFonH9v6p41eqxdbiAxJdDGOT0V2Gpt3UBSNuHz8ED9/aIHqv+P7M+VD6Xd2XYwctPniWlaSWx57sWcnG/VkFG45qFQAyha64uxOOe4M3ZmG/n5FfauZ8cBVLiRKEIr+CyNhh1ujfzi7+4uzMlSNL5t/BbZamAQuZzqGzGQ9RVvIlyPgUGNJtDEE/hWS09aagXF5T6EMj00szizErh4J1/x4qZwml5+TcBN31E0QmAhCtZe85sr3tYgic+hEz9XX1yymQzf/C7n4to2yNvq0r4g51xDk8IuP95WEh7zaqLlvFZvBFgxpHZBMYlRvhytjOYDeIFRMcGwHZcXosaG2ejqDwcGq/LC4oeG4sSwmg9sdRrtcmcanrNqrBka86WYO6LntI3JdZ86/1ACEUHzhCCwvrKELc9Ji1xxGAgS7QKH+s2/hnJuiMyv73gOVLKYC+wPMLt+fvOmPLSEl+PJiAIlToBq1KUBg03RSQLfPOLD7OrJ8VvDZsEPwejqlGDyc4wRglS9OTi7SnN5LYHSDNDdGdREegWqq9qDHEYEVLI=

env:
global:
- MODULE_ID=cbi18n
matrix:
- ENGINE=lucee@4.5
- ENGINE=lucee@5
- ENGINE=adobe@10
- ENGINE=adobe@11
- ENGINE=adobe@2016

branches:
only:
- development
- master

sudo: required

dist: trusty

sudo: required

before_install:
# CommandBox Keys
- sudo apt-key adv --keyserver keys.gnupg.net --recv 6DA70622
Expand All @@ -17,39 +31,71 @@ before_install:

install:
# Install Commandbox
- sudo apt-get update && sudo apt-get --assume-yes install commandbox
- sudo apt-get update && sudo apt-get --assume-yes install rsync jq commandbox
# Test that the box binary is available and ready for our tests
- box version
# If using auto-publish, you will need to provide your API token with this line:
- box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null
# Setup for our tests
- mkdir tests/results
- sudo chmod -R 775 tests/results

# Build script - note module versioning is passed to ANT
script:
- sudo ant -DisTravis=true -Dbuild.number=$TRAVIS_BUILD_NUMBER -f workbench/build.xml

# run our dependency install to ensure the workbench is in place
- box install
# add our module-specific build properties
- printf "\nmodule.name=$MODULE_ID" >> workbench/build.properties
- printf "\ncfengine=$ENGINE" >> workbench/build.properties
# execute our build
- ant -DisTravis=true -Dbuild.number=$TRAVIS_BUILD_NUMBER -Dbuild.branch=$TRAVIS_BRANCH -f workbench/build.xml

after_failure:
- cd $TRAVIS_BUILD_DIR
# Display the contents of our root directory
# Spit out our Commandbox log in case we need to debug
- box server log name=$ENGINE
- cat `box system-log`

# Only executed when merging to master
before_deploy:
- mkdir s3deploy
- cp -r ./artifacts/cbi18n/* ./s3deploy/
- cd $TRAVIS_BUILD_DIR
- mkdir -p s3deploy
- rsync -av ./artifacts/$MODULE_ID/ ./s3deploy/
- rm -f ./s3deploy/box-repo.json

deploy:
on:
branch:
- master
skip_cleanup: true
provider: s3
#AWS Credentials need to be set in Travis
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_ACCESS_SECRET
bucket: "downloads.ortussolutions.com"
local-dir: s3deploy
upload-dir: ortussolutions/coldbox-modules/cbi18n
acl: public_read
#Module Deployment
- provider: s3
on:
branch:
- master
- development
condition: "$ENGINE = lucee@4.5"
skip_cleanup: true
#AWS Credentials need to be set in Travis
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_ACCESS_SECRET
bucket: "downloads.ortussolutions.com"
local-dir: s3deploy
upload-dir: ortussolutions/coldbox-modules/$MODULE_ID
acl: public_read
#API Docs Deployment
- provider: s3
on:
branch:
- master
- development
condition: "$ENGINE = lucee@4.5"
skip_cleanup: true
#AWS Credentials need to be set in Travis
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_ACCESS_SECRET
bucket: "apidocs.ortussolutions.com"
local-dir: build/apidocs
upload-dir: coldbox-modules/$MODULE_ID
acl: public_read


after_deploy:
- cd $TRAVIS_BUILD_DIR/build && box forgebox publish

notifications:
slack:
secure: FIHlTn/YO7Wgumm1uIqmoEsqjQA7fV0AE94Rjc5yKzM3AquQa8HicgDVVk0d2GrKRnl0xt3j4ZJV//VJyIjlCd/QVKuj48R2ChjEY2im3+99HFPafCUI5/S2uyowKU6mJTFonH9v6p41eqxdbiAxJdDGOT0V2Gpt3UBSNuHz8ED9/aIHqv+P7M+VD6Xd2XYwctPniWlaSWx57sWcnG/VkFG45qFQAyha64uxOOe4M3ZmG/n5FfauZ8cBVLiRKEIr+CyNhh1ujfzi7+4uzMlSNL5t/BbZamAQuZzqGzGQ9RVvIlyPgUGNJtDEE/hWS09aagXF5T6EMj00szizErh4J1/x4qZwml5+TcBN31E0QmAhCtZe85sr3tYgic+hEz9XX1yymQzf/C7n4to2yNvq0r4g51xDk8IuP95WEh7zaqLlvFZvBFgxpHZBMYlRvhytjOYDeIFRMcGwHZcXosaG2ejqDwcGq/LC4oeG4sSwmg9sdRrtcmcanrNqrBka86WYO6LntI3JdZ86/1ACEUHzhCCwvrKELc9Ji1xxGAgS7QKH+s2/hnJuiMyv73gOVLKYC+wPMLt+fvOmPLSEl+PJiAIlToBq1KUBg03RSQLfPOLD7OrJ8VvDZsEPwejqlGDyc4wRglS9OTi7SnN5LYHSDNDdGdREegWqq9qDHEYEVLI=
72 changes: 1 addition & 71 deletions apidocs/box.json
Original file line number Diff line number Diff line change
@@ -1,85 +1,15 @@
{
"name":"API Docs",
"version":"1.0.0",
"author":"",
"location":"",
"directory":"",
"createPackageDirectory":true,
"packageDirectory":"",
"homepage":"",
"documentation":"",
"repository":{
"type":"",
"URL":""
},
"bugs":"",
"slug":"module-apidocs",
"shortDescription":"",
"description":"",
"instructions":"",
"changelog":"",
"type":"",
"keywords":[

],
"private":true,
"engines":[
{
"type":"",
"version":""
}
],
"defaultEngine":"",
"projectURL":"",
"license":[
{
"type":"",
"URL":""
}
],
"contributors":[

],
"dependencies":{
"docbox":"2.0.7"
"docbox":"^2.0.7+00005"
},
"devDependencies":{

},
"installPaths":{
"docbox":"docbox"
},
"ignore":[
"**/.*",
"tests"
],
"testbox":{
"runner":[
{
"default":""
}
],
"labels":[

],
"reporter":"",
"reporterResults":"",
"bundles":[
""
],
"directory":{
"mapping":"",
"recurse":true
},
"watchers":[

],
"notify":{
"emails":[

],
"growl":"",
"URL":""
}
}
}
15 changes: 10 additions & 5 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
{
"name":"CBi18n Builder",
"version":"1.0.0",
"version":"1.3.2",
"slug":"cbi18n-shell",
"private":false,
"dependencies":{
"coldbox":"^4.3.0"
"coldbox":"^4.3.0",
"workbench":"git+https://github.com/Ortus-Solutions/unified-workbench.git"
},
"devDependencies":{
"testbox":"^2.3.0+00044"
"testbox":"^2.4.0+80"
},
"installPaths":{
"coldbox":"coldbox",
"testbox":"testbox"
"testbox":"testbox",
"workbench":"workbench"
},
"testbox":{
"runner":"http://localhost:49616/tests/runner.cfm"
"runner":"http://localhost:49616"
},
"scripts":{
"postVersion":"recipe workbench/bump.boxr"
}
}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGELOG
=========

## 1.3.2
* Unified workbench
* Encapsulation of module bundle resources

## 1.3.1
* Varscoping fixes
* Travis updates
Expand Down
8 changes: 4 additions & 4 deletions config/Coldbox.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<cfcomponent output="false" hint="My App Configuration">
<cfscript>
component{

// Configure ColdBox Application
function configure(){

Expand Down Expand Up @@ -92,5 +92,5 @@
];

}
</cfscript>
</cfcomponent>

}
2 changes: 0 additions & 2 deletions modules/cbi18n/ModuleConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ component {
this.viewParentLookup = true;
// If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa
this.layoutParentLookup = true;
// Module Entry Point
this.entryPoint = "cbi18n";
// Model Namespace
this.modelNamespace = "cbi18n";
// Auto Map Models Directory
Expand Down
6 changes: 3 additions & 3 deletions modules/cbi18n/box.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"slug" : "cbi18n",
"type" : "modules",
"keywords" : "i18n,internationalization,localization,language support",
"homepage" : "https://github.com/ColdBox/cbox-i18n",
"homepage" : "https://github.com/coldbox-modules/cbox-i18n",
"location" : "http://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbi18n/@build.version@/cbi18n-@build.version@.zip",
"documentation" : "https://github.com/ColdBox/cbox-i18n/wiki",
"repository" : { "type" : "git", "url" : "https://github.com/ColdBox/cbox-i18n" },
"documentation" : "https://github.com/coldbox-modules/cbox-i18n/wiki",
"repository" : { "type" : "git", "url" : "https://github.com/coldbox-modules/cbox-i18n" },
"shortDescription" : "This module will enhance your ColdBox applications with i18n capabilities, resource bundles and localization.",
"license" : [
{ "type" : "Apache2", "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" }
Expand Down
5 changes: 0 additions & 5 deletions modules/cbi18n/models/Mixins.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ function getResource(
values,
bundle
){
// check for resource@bundle convention:
if( find( "@", arguments.resource ) ){
arguments.bundle = listLast( arguments.resource, "@" );
arguments.resource = listFirst( arguments.resource, "@" );
}
// Verify injection
if( NOT structKeyExists( variables, "cboxResourceService" ) ){
variables.cboxResourceService = getInstance( "resourceService@cbi18n" );
Expand Down
6 changes: 6 additions & 0 deletions modules/cbi18n/models/ResourceService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ Inspired by Paul Hastings
var thisLocale = arguments.locale;
var rbFile = "";

// check for resource@bundle convention:
if( find( "@", arguments.resource ) ){
arguments.bundle = listLast( arguments.resource, "@" );
arguments.resource = listFirst( arguments.resource, "@" );
}

try{

// Check if the locale has a language bundle loaded in memory
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ resource bundles and localization.
Apache License, Version 2.0.

##IMPORTANT LINKS
- Documentation: https://github.com/ColdBox/cbox-i18n/wiki
- Source: https://github.com/ColdBox/cbox-i18n
- Documentation: https://github.com/coldbox-modules/cbox-i18n/wiki
- Source: https://github.com/coldbox-modules/cbox-i18n
- ForgeBox: https://forgebox.io/view/i18n
- [Changelog](changelog.md)

Expand Down Expand Up @@ -92,7 +92,7 @@ function getResource(
function $r()
```

You can read more about this module here: https://github.com/ColdBox/cbox-i18n/wiki
You can read more about this module here: https://github.com/coldbox-modules/cbox-i18n/wiki

********************************************************************************
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
Expand Down
10 changes: 5 additions & 5 deletions tests/test.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
url.runners.default=http://localhost:50680/tests/runner.cfm?
url.runners.lucee5=http://localhost:50685/tests/runner.cfm?
url.runners.acf10=http://localhost:49610/tests/runner.cfm?
url.runners.acf11=http://localhost:49611/tests/runner.cfm?
url.runners.acf2016=http://localhost:49616/tests/runner.cfm?
url.runners.lucee@4.5=http://127.0.0.1:50680/tests/runner.cfm?
url.runners.lucee@5=http://127.0.0.1:50685/tests/runner.cfm?
url.runners.adobe@10=http://127.0.0.1:49610/tests/runner.cfm?
url.runners.adobe@11=http://127.0.0.1:49611/tests/runner.cfm?
url.runners.adobe@2016=http://127.0.0.1:49616/tests/runner.cfm?
Loading

0 comments on commit 7ebdf57

Please sign in to comment.