ci: tests for macOS on Gitlab CI
[nit.git] / lib / popcorn / pop_repos.nit
index 1f12853..c054d5a 100644 (file)
 # Repositories can be used in Popcorn app to manage your data persistence.
 # Here an example with a book management app:
 #
-# ~~~
+# ~~~nitish
 # # First we declare the `Book` class. It has to be serializable so it can be used
 # # within a `Repository`.
 #
 # import popcorn
 # import popcorn::pop_repos
+# import popcorn::pop_json
 #
 # # Serializable book representation.
 # class Book
 #      serialize
-#      super Jsonable
 #
 #      # Book uniq ID
 #      var id: String = (new MongoObjectId).id is serialize_as "_id"
 # # Let's wrap it all together in a Popcorn app:
 #
 # # Init database
-# var mongo = new MongoClient("mongodb://localhost:27017/")
+# var mongo = new MongoClient("mongodb://mongo:27017/")
 # var db = mongo.database("tests_app_{100000.rand}")
 # var coll = db.collection("books")
 #
@@ -126,7 +126,7 @@ import mongodb::queries
 redef class AppConfig
 
        # Default database host string for MongoDb
-       var default_db_host = "mongodb://localhost:27017/"
+       var default_db_host = "mongodb://mongo:27017/"
 
        # Default database hostname
        var default_db_name = "popcorn"
@@ -252,9 +252,10 @@ end
 
 # A Repository that uses MongoDB as backend.
 #
-# ~~~
+# ~~~nitish
 # import popcorn
 # import popcorn::pop_repos
+# import popcorn::pop_json
 #
 # # First, let's create a User abstraction:
 #
@@ -289,7 +290,7 @@ end
 # # The repository can then be used with User instances:
 #
 # # Init database
-# var mongo = new MongoClient("mongodb://localhost:27017/")
+# var mongo = new MongoClient("mongodb://mongo:27017/")
 # var db = mongo.database("tests")
 # var coll = db.collection("test_pop_repo_{100000.rand}")
 #
@@ -407,7 +408,6 @@ end
 # end
 # ~~~
 abstract class RepoObject
-       super Jsonable
        serialize
 
        # `self` unique id.